]> granicus.if.org Git - apache/commitdiff
Merge r1727544 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 11 Feb 2016 19:05:07 +0000 (19:05 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 11 Feb 2016 19:05:07 +0000 (19:05 +0000)
* Ensure that proto_num and protocol is set in another "error out early" edge
  case. This can happen with invalid CONNECT requests as described in the PR.

PR: 58929

Submitted by: rpluem
Reviewed/backported by: jim

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

CHANGES
STATUS
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 68950ad537b643c399cd9313e0c5f66ec195e475..3a0193825abaa2a5e93a7fe09ae8ad2c9c52e5a8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.4.19
 
+  *) core: Prevent a server crash in case of an invalid CONNECT request with
+     a custom error page for status code 400 that uses server side includes.
+     PR 58929 [Ruediger Pluem]
+
   *) mod_ssl: handle TIMEOUT on empty SSL input as non-fatal, returning 
      APR_TIMEUP and preserving connection state for later retry.
      [Stefan Eissing]
diff --git a/STATUS b/STATUS
index b69018fa8ebe97fcddee00f97f2d0ea74b032650..3f28ae73a6f49802a294df0b868cf989f76e005e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,15 +112,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) core: Prevent a server crash in case of an invalid CONNECT request with
-     a custom error page for status code 400 that uses server side includes.
-     PR 58929
-     Trunk version of patch:
-         http://svn.apache.org/r1727544
-     Backport version for 2.4.x of patch:
-         Trunk version of patch works modulo CHANGES
-     +1: rpluem, covener, ylavic
-
   *) core: Add expression support to SetHandler (someone wanted this in
      a well-articulated serverfault post).
      trunk patch:  http://svn.apache.org/r1725149
index 86f2f5e71849617947ef05208958ae9edf6ce075..817cd3e12676c88e648974729958323196060711 100644 (file)
@@ -638,6 +638,8 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
 
     ap_parse_uri(r, uri);
     if (r->status != HTTP_OK) {
+        r->proto_num = HTTP_VERSION(1,0);
+        r->protocol  = apr_pstrdup(r->pool, "HTTP/1.0");
         return 0;
     }