MCPcopy Create free account
hub / github.com/apache/httpd / dav_method_post

Function dav_method_post

modules/dav/main/mod_dav.c:960–985  ·  view source on GitHub ↗

validate resource/locks on POST, then pass to the default handler */

Source from the content-addressed store, hash-verified

958
959/* validate resource/locks on POST, then pass to the default handler */
960static int dav_method_post(request_rec *r)
961{
962 dav_resource *resource;
963 dav_error *err;
964
965 /* Ask repository module to resolve the resource */
966 err = dav_get_resource(r, 0 /* label_allowed */, 0 /* use_checked_in */,
967 &resource);
968 if (err != NULL)
969 return dav_handle_err(r, err, NULL);
970
971 /* check for any method preconditions */
972 if (dav_run_method_precondition(r, resource, NULL, NULL, &err) != DECLINED
973 && err) {
974 return dav_handle_err(r, err, NULL);
975 }
976
977 /* Note: depth == 0. Implies no need for a multistatus response. */
978 if ((err = dav_validate_request(r, resource, 0, NULL, NULL,
979 DAV_VALIDATE_RESOURCE, NULL)) != NULL) {
980 /* ### add a higher-level description? */
981 return dav_handle_err(r, err, NULL);
982 }
983
984 return DECLINED;
985}
986
987/* handle the PUT method */
988static int dav_method_put(request_rec *r)

Callers 1

dav_handlerFunction · 0.85

Calls 3

dav_get_resourceFunction · 0.85
dav_handle_errFunction · 0.85
dav_validate_requestFunction · 0.85

Tested by

no test coverage detected