]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy_http: Don't expect the backend to ack the "Connection: close" to
authorYann Ylavic <ylavic@apache.org>
Tue, 10 Feb 2015 17:03:05 +0000 (17:03 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 10 Feb 2015 17:03:05 +0000 (17:03 +0000)
finally close those not meant to be kept alive by SetEnv proxy-nokeepalive
or force-proxy-request-1.0, and respond with 502 instead of 400 if its
Connection header is invalid.

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

CHANGES
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index df387bb7e9a2b67ded67af75b4afbbff9b9b6238..4a0d059c6e790fc5c8d80962a8fd3ea8f674af6f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@ Changes with Apache 2.5.0
      calls r:wsupgrade() can cause a child process crash. 
      [Edward Lu <Chaosed0 gmail.com>]
 
+  *) mod_proxy_http: Don't expect the backend to ack the "Connection: close" to
+     finally close those not meant to be kept alive by SetEnv proxy-nokeepalive
+     or force-proxy-request-1.0, and respond with 502 instead of 400 if its
+     Connection header is invalid.  [Yann Ylavic]
+
   *) mod_authn_dbd: Fix the error message logged in case of error while querying
      the database. This is associated to AH01656 and AH01661. [Christophe Jaillet]
   
index ddab4a2f0216e8e428881e14acdfd1292b72a0dc..0a27a52d50785c82913312241464821937a120f4 100644 (file)
@@ -1548,10 +1548,12 @@ int ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
 
             /* strip connection listed hop-by-hop headers from response */
             toclose = ap_proxy_clear_connection_fn(r, r->headers_out);
-            backend->close = (toclose != 0);
-            if (toclose < 0) {
-                return ap_proxyerror(r, HTTP_BAD_REQUEST,
-                        "Malformed connection header");
+            if (toclose) {
+                backend->close = 1;
+                if (toclose < 0) {
+                    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
+                                         "Malformed connection header");
+                }
             }
 
             if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {