### move to dav_util? */
| 709 | |
| 710 | /* ### move to dav_util? */ |
| 711 | DAV_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 | |
| 736 | static int dav_get_overwrite(request_rec *r) |
| 737 | { |
no test coverage detected