From: Yann Ylavic Date: Tue, 10 Feb 2015 17:25:54 +0000 (+0000) Subject: mod_proxy_http: Use the "Connection: close" header for requests to X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8d2c0f6a18c8d3cf2a7389567615f0e7e9c4021;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy_http: Use the "Connection: close" header for requests to backends not recycling connections (disablereuse), including the default reverse and forward proxies. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1658765 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4a0d059c6e7..1197bf42fef 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,10 @@ Changes with Apache 2.5.0 calls r:wsupgrade() can cause a child process crash. [Edward Lu ] + *) mod_proxy_http: Use the "Connection: close" header for requests to + backends not recycling connections (disablereuse), including the default + reverse and forward proxies. [Yann Ylavic] + *) 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 diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 0a27a52d507..6298014b75e 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -974,7 +974,7 @@ skip_body: * otherwise sent Connection: Keep-Alive. */ if (!force10) { - if (p_conn->close) { + if (!ap_proxy_connection_reusable(p_conn)) { buf = apr_pstrdup(p, "Connection: close" CRLF); } else {