Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 85682 invoked from network); 12 Feb 2011 12:16:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Feb 2011 12:16:45 -0000 Received: (qmail 85972 invoked by uid 500); 12 Feb 2011 12:16:44 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 85765 invoked by uid 500); 12 Feb 2011 12:16:41 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 85758 invoked by uid 99); 12 Feb 2011 12:16:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Feb 2011 12:16:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Feb 2011 12:16:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 48E0F2388906; Sat, 12 Feb 2011 12:16:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1070061 - in /httpd/httpd/trunk: CHANGES STATUS modules/dav/main/mod_dav.c Date: Sat, 12 Feb 2011 12:16:19 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110212121619.48E0F2388906@eris.apache.org> Author: sf Date: Sat Feb 12 12:16:18 2011 New Revision: 1070061 URL: http://svn.apache.org/viewvc?rev=1070061&view=rev Log: 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 Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/STATUS httpd/httpd/trunk/modules/dav/main/mod_dav.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1070061&r1=1070060&r2=1070061&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Sat Feb 12 12:16:18 2011 @@ -2,6 +2,9 @@ Changes with Apache 2.3.11 + *) mod_dav: Revert change to send 501 error if unknown Content-* header is + received for a PUT request. PR 42978. [Stefan Fritsch] + *) mod_cache: Respect s-maxage as described by RFC2616 14.9.3, which must take precedence if present. PR 35247. [Graham Leggett] Modified: httpd/httpd/trunk/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/STATUS?rev=1070061&r1=1070060&r2=1070061&view=diff ============================================================================== --- httpd/httpd/trunk/STATUS (original) +++ httpd/httpd/trunk/STATUS Sat Feb 12 12:16:18 2011 @@ -151,8 +151,8 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE RE * RFC 2616 violations. Closed PRs: 15852, 15857, 15859, 15861, 15864, 15869, 15870, 16120, 16125, 16135, 16136, 16137, 16138, 16139, 16140, 16518, - 16520, 42978, 49825 - Open PRs: 15865, 15866, 15868, 16126, 16133, 16142, 16521 + 16520, 49825 + Open PRs: 15865, 15866, 15868, 16126, 16133, 16142, 16521, 42978 jerenkrantz says: need to decide how many we need to backport and/or if these rise to showstopper status. wrowe suggests: it would be nice to see "MUST" v.s. "SHOULD" v.s. "MAY" Modified: httpd/httpd/trunk/modules/dav/main/mod_dav.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.c?rev=1070061&r1=1070060&r2=1070061&view=diff ============================================================================== --- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original) +++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Sat Feb 12 12:16:18 2011 @@ -802,30 +802,6 @@ static int dav_parse_range(request_rec * 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 */,