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

Function dav_get_depth

modules/dav/main/mod_dav.c:711–734  ·  view source on GitHub ↗

### move to dav_util? */

Source from the content-addressed store, hash-verified

709
710/* ### move to dav_util? */
711DAV_DECLARE(int) dav_get_depth(request_rec *r, int def_depth)
712{
713 const char *depth = apr_table_get(r->headers_in, "Depth");
714
715 if (depth == NULL) {
716 return def_depth;
717 }
718
719 if (ap_cstr_casecmp(depth, "infinity") == 0) {
720 return DAV_INFINITY;
721 }
722 else if (strcmp(depth, "0") == 0) {
723 return 0;
724 }
725 else if (strcmp(depth, "1") == 0) {
726 return 1;
727 }
728
729 /* The caller will return an HTTP_BAD_REQUEST. This will augment the
730 * default message that Apache provides. */
731 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00580)
732 "An invalid Depth header was specified.");
733 return -1;
734}
735
736static int dav_get_overwrite(request_rec *r)
737{

Callers 7

dav_method_deleteFunction · 0.85
dav_method_propfindFunction · 0.85
dav_method_copymoveFunction · 0.85
dav_method_lockFunction · 0.85
dav_method_updateFunction · 0.85
dav_method_labelFunction · 0.85
dav_lock_parse_lockinfoFunction · 0.85

Calls 1

ap_cstr_casecmpFunction · 0.85

Tested by

no test coverage detected