summaryrefslogtreecommitdiff
path: root/modules/dav
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-02-12 12:16:18 +0000
committerStefan Fritsch <sf@apache.org>2011-02-12 12:16:18 +0000
commit2e8f78ee92c91e04db8126d2192f3e3d0f2e2a4c (patch)
tree1334bacfdf39688fc2bef0a1cd3878d6dd7439f9 /modules/dav
parenta35cce99fe83222b7616d846ad22bd659a8db81b (diff)
downloadhttpd-2e8f78ee92c91e04db8126d2192f3e3d0f2e2a4c.tar.gz
revert r1026746:
If an unknown Content-* header is received for a PUT request, we must not ignore it but reply with 501 per RFC 2616 9.6. PR: 42978 Vetoed by Roy T. Fielding: http://mail-archives.apache.org/mod_mbox/httpd-dev/201102.mbox/%3C9A5A8B62-ED16-4BD3-97DA-8475026BB81D@gbiv.com%3E git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070061 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/dav')
-rw-r--r--modules/dav/main/mod_dav.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c
index ec154cd2b2..42d3abaa75 100644
--- a/modules/dav/main/mod_dav.c
+++ b/modules/dav/main/mod_dav.c
@@ -802,30 +802,6 @@ static int dav_parse_range(request_rec *r,
return 1;
}
-static const char *dav_validate_content_headers(request_rec *r)
-{
- int i, prefix_len = strlen("content-");
- const apr_array_header_t *arr = apr_table_elts(r->headers_in);
- const apr_table_entry_t *elts = (const apr_table_entry_t *)arr->elts;
-
- for (i = 0; i < arr->nelts; ++i) {
- if (elts[i].key == NULL)
- continue;
- if (strncasecmp(elts[i].key, "content-", prefix_len) == 0
- && strcasecmp(elts[i].key + prefix_len, "length") != 0
- && strcasecmp(elts[i].key + prefix_len, "range") != 0
- /* Content-Location may be ignored per RFC 2616 14.14 */
- && strcasecmp(elts[i].key + prefix_len, "location") != 0
- && strcasecmp(elts[i].key + prefix_len, "type") != 0)
- {
- /* XXX: content-md5? content-language? content-encoding? */
- return apr_psprintf(r->pool, "Support for %s is not implemented.",
- ap_escape_html(r->pool, elts[i].key));
- }
- }
- return NULL;
-}
-
/* handle the GET method */
static int dav_method_get(request_rec *r)
{
@@ -973,14 +949,6 @@ static int dav_method_put(request_rec *r)
mode = DAV_MODE_WRITE_TRUNC;
}
- if ((body = dav_validate_content_headers(r)) != NULL) {
- /* RFC 2616 9.6: We must not ignore any Content-* headers we do not
- * understand.
- * XXX: Relax this for HTTP 1.0 requests?
- */
- return dav_error_response(r, HTTP_NOT_IMPLEMENTED, body);
- }
-
/* make sure the resource can be modified (if versioning repository) */
if ((err = dav_auto_checkout(r, resource,
0 /* not parent_only */,