]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Revert 1068310 as vetoed by Roy:
authorRuediger Pluem <rpluem@apache.org>
Wed, 9 Feb 2011 08:43:17 +0000 (08:43 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 9 Feb 2011 08:43:17 +0000 (08:43 +0000)
This requirement will
be (or has already been) removed from httpbis because it hinders
extensibility and breaks content management systems, just as the
change below causes content-language to be broken.  That is why
we never implemented this requirement when it was added (without
consensus) to RFC 2616.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1068793 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/dav/main/mod_dav.c

diff --git a/CHANGES b/CHANGES
index 81e4d597a0a13290cd1ccb31e66cddcdf53ead7a..14883f2257a9e4bf036e412fe65b25bb5e6a9b96 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,9 +5,6 @@ Changes with Apache 2.2.18
      that we asked for to leak to the client should the 304 response be
      uncacheable. PR45341 [Graham Leggett]
 
-  *) mod_dav: Send 501 error if unknown Content-* header is received for a PUT
-     request (RFC 2616 9.6). PR 42978. [Stefan Fritsch]
-
   *) mod_dav: Send 400 error if malformed Content-Range header is received for
      a put request (RFC 2616 14.16). PR 49825. [Stefan Fritsch]
 
diff --git a/STATUS b/STATUS
index e7b5597264b20959af952b5abf176a924970a8d9..f3fa4f5702d3d24c021e664930fbc96c59e1cc3f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -217,6 +217,23 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 
 PATCHES/ISSUES THAT ARE STALLED
 
+  * mod_dav: 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
+    Trunk version of patch:
+      http://svn.apache.org/viewvc?rev=1026746&view=rev
+    Backport version for 2.2.x of patch:
+      Trunk version of patch works
+    +1: rpluem, covener, poirier
+    -1: roy:
+
+This requirement will
+be (or has already been) removed from httpbis because it hinders
+extensibility and breaks content management systems, just as the
+change below causes content-language to be broken.  That is why
+we never implemented this requirement when it was added (without
+consensus) to RFC 2616.
+
   * core: Support wildcards in both the directory and file components of
     the path specified by the Include directive.
     Trunk patch: http://svn.apache.org/viewvc?rev=909878&view=rev
index a94a30562624b40311a806e0102d0e93ab50acc9..90370c6cc32d44188da948e8d2139854059e21c5 100644 (file)
@@ -812,30 +812,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)
 {
@@ -983,14 +959,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 */,