You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2017/06/29 00:16:38 UTC
svn commit: r1800216 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS
server/protocol.c
Author: wrowe
Date: Thu Jun 29 00:16:37 2017
New Revision: 1800216
URL: http://svn.apache.org/viewvc?rev=1800216&view=rev
Log:
Restore single-char field names inadvertantly disallowed in 2.4.25.
Backports: r1800173
PR: 61220
Submitted by: ylavic
Reviewed by: wrowe, jchampion, ylavic
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/server/protocol.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1800216&r1=1800215&r2=1800216&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Jun 29 00:16:37 2017
@@ -1,7 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.34
-
+ *) Allow single-char field names inadvertantly disallowed in 2.2.32.
+ PR 61220. [Yann Ylavic]
Changes with Apache 2.2.33
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1800216&r1=1800215&r2=1800216&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Jun 29 00:16:37 2017
@@ -104,14 +104,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Restore single-char field names inadvertantly disallowed in 2.4.25.
- Backports: r1800173
- PR: 61220
- Submitted by: ylavic
- trunk patch: http://svn.apache.org/r1800173 (plus CHANGES)
- 2.2.x patch: https://home.apache.org/~jchampion/patches/2.2.x-allow-single-char-headers.patch
- +1: wrowe, jchampion, ylavic
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
Modified: httpd/httpd/branches/2.2.x/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/protocol.c?rev=1800216&r1=1800215&r2=1800216&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/protocol.c (original)
+++ httpd/httpd/branches/2.2.x/server/protocol.c Thu Jun 29 00:16:37 2017
@@ -1081,8 +1081,12 @@ AP_DECLARE(void) ap_get_mime_headers_cor
return;
}
- /* last character of field-name */
- tmp_field = value - (value > last_field ? 1 : 0);
+ if (value == last_field) {
+ r->status = HTTP_BAD_REQUEST;
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "Request header field name was empty");
+ return;
+ }
*value++ = '\0'; /* NUL-terminate at colon */
@@ -1105,13 +1109,6 @@ AP_DECLARE(void) ap_get_mime_headers_cor
" bad whitespace");
return;
}
-
- if (tmp_field == last_field) {
- r->status = HTTP_BAD_REQUEST;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Request header field name was empty");
- return;
- }
}
else /* Using strict RFC7230 parsing */
{