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

Function dav_get_overwrite

modules/dav/main/mod_dav.c:736–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734}
735
736static int dav_get_overwrite(request_rec *r)
737{
738 const char *overwrite = apr_table_get(r->headers_in, "Overwrite");
739
740 if (overwrite == NULL) {
741 return 1; /* default is "T" */
742 }
743
744 if ((*overwrite == 'F' || *overwrite == 'f') && overwrite[1] == '\0') {
745 return 0;
746 }
747
748 if ((*overwrite == 'T' || *overwrite == 't') && overwrite[1] == '\0') {
749 return 1;
750 }
751
752 /* The caller will return an HTTP_BAD_REQUEST. This will augment the
753 * default message that Apache provides. */
754 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00581)
755 "An invalid Overwrite header was specified.");
756 return -1;
757}
758
759/* resolve a request URI to a resource descriptor.
760 *

Callers 2

dav_method_copymoveFunction · 0.85
dav_method_bindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected