]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport from HEAD:
authorJoe Orton <jorton@apache.org>
Tue, 2 Dec 2003 14:38:41 +0000 (14:38 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 2 Dec 2003 14:38:41 +0000 (14:38 +0000)
* proxy_http.c (ap_proxy_http_process_response): Send a valid
status-line even if the parsed status-line had no trailing spaces.
Remove the warning for this case as triggers for valid status-lines
too.

PR: 23998
Reviewed by: Jeff Trawick, Bill Stoddard

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

CHANGES
STATUS
modules/proxy/proxy_http.c

diff --git a/CHANGES b/CHANGES
index 8dc63159c6c36c57eb5b530b2fde4f8db8d2fa3a..c29748448dd8ce977aa01575d681bff104dd51aa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.49
 
+  *) mod_proxy: Fix cases where an invalid status-line could be sent 
+     to the client.  PR 23998.  [Joe Orton]
+
   *) mod_ssl: Fix segfaults at startup if other modules which use OpenSSL
      are also loaded.  [Joe Orton]
 
diff --git a/STATUS b/STATUS
index 18d6c8c940929d8594dc1907ac33d723aec95b69..fa21d49c665d5a5341cb5850bb26f9b19be7a0de 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2003/12/02 14:23:23 $]
+Last modified at [$Date: 2003/12/02 14:38:40 $]
 
 Release:
 
@@ -80,15 +80,6 @@ PATCHES TO BACKPORT FROM 2.1
       +1: stoddard
       +1 (concept): trawick (looks reasonable when compared with worker)
 
-    * Prevent mod_proxy from sending an invalid status-line to clients
-      in some cases.
-      modules/proxy/proxy_http.c: r1.172
-      +1: jorton, trawick, stoddard
-      trawick: whoever merges this please create CHANGES entry in both
-               "trees" and reference PR 18573; oops, Joe thought he
-               was solving 23998 :)  So close the extra one as a dup
-               of whichever one gets listed in CHANGES
-
     * Fix timezone handling in mod_log_config.  PR 23642
       modules/loggers/mod_log_config.c: r1.107
       +1: jorton, stoddard, trawick
index 53a5793b98e202bb3e5a12b5ee0de031f21862c7..634f5438458751bbe2b369d98ac496695b07cc1e 100644 (file)
@@ -756,16 +756,18 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
             backasswards = 0;
 
             keepchar = buffer[12];
-            if (keepchar == '\0') {
-                ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
-                             r->server, "proxy: bad HTTP/%d.%d status line "
-                             "returned by %s (%s)", major, minor, r->uri,
-                             r->method);
-            }
             buffer[12] = '\0';
             r->status = atoi(&buffer[9]);
 
-            buffer[12] = keepchar;
+            if (keepchar != '\0') {
+                buffer[12] = keepchar;
+            } else {
+                /* 2616 requires the space in Status-Line; the origin
+                 * server may have sent one but ap_rgetline_core will
+                 * have stripped it. */
+                buffer[12] = ' ';
+                buffer[13] = '\0';
+            }
             r->status_line = apr_pstrdup(p, &buffer[9]);