Commit e32be8a2 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1658760 from trunk:

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.

Submitted by: ylavic
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1669558 13f79535-47bb-0310-9956-ffa450edef68
parent 296ff2b5
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGES: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ Changes with Apache 2.4.13
     context for directories found by mod_userdir and mod_alias.  These no
     longer require RewriteBase to be specified. [Eric Covener]

  *) 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.  [Yann Ylavic]

  *) mod_lua: After a r:wsupgrade(), mod_lua was not properly
     responding to a websockets PING but instead invoking the specified 
     script. PR57524. [Edward Lu <Chaosed0 gmail.com>]
+5 −1
Changes for modules/proxy/mod_proxy_http.c: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1383,6 +1383,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
         */
        if (apr_date_checkmask(buffer, "HTTP/#.# ###*")) {
            int major, minor;
            int toclose;

            major = buffer[5] - '0';
            minor = buffer[7] - '0';
@@ -1491,7 +1492,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
            te = apr_table_get(r->headers_out, "Transfer-Encoding");

            /* strip connection listed hop-by-hop headers from response */
            backend->close = ap_proxy_clear_connection_fn(r, r->headers_out);
            toclose = ap_proxy_clear_connection_fn(r, r->headers_out);
            if (toclose) {
                backend->close = 1;
            }

            if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
                ap_set_content_type(r, apr_pstrdup(p, buf));