]> granicus.if.org Git - apache/commitdiff
Prevent mod_proxy from truncating one character off the
authorBill Stoddard <stoddard@apache.org>
Mon, 31 Dec 2001 20:53:28 +0000 (20:53 +0000)
committerBill Stoddard <stoddard@apache.org>
Mon, 31 Dec 2001 20:53:28 +0000 (20:53 +0000)
end of the status line returned from the proxied server.
Note that buffer is NULL terminated by the call to
ap_proxy_string_read() so there is no need to terminate it
again.

Submitted by: Adam Sussman
Reviewed by: Bill Stoddard

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

CHANGES
modules/proxy/proxy_http.c

diff --git a/CHANGES b/CHANGES
index 51a986b69180f9c71322d45b7c0d29e8cd671121..455ed943b0f2da9cf535b5f6be0d1798464c992a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,8 @@
 Changes with Apache 2.0.30-dev
+  *) Prevent mod_proxy from truncating one character off the
+     end of the status line returned from the proxied server.
+     [Adam Sussman, Bill Stoddard]
+
   *) Eliminate loop in ap_proxy_string_read().
      [Adam Sussman, Bill Stoddard]
 
index 4b73b1e81aca9a9a98d30734dc203ade11557e42..e45021c9b24425b1fea78c7c016e63ec4d3fa1e5 100644 (file)
@@ -670,6 +670,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
 
        /* Is it an HTTP/1 response?
         * This is buggy if we ever see an HTTP/1.10
+        * XXX: This code is way crufty...
         */
         if (apr_date_checkmask(buffer, "HTTP/#.# ###*")) {
             int major, minor;
@@ -689,7 +690,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                             "server: ", buffer, NULL));
             }
             backasswards = 0;
-            buffer[--len] = '\0';
 
             buffer[12] = '\0';
             r->status = atoi(&buffer[9]);