httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1703807 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Fri, 18 Sep 2015 10:58:59 GMT
Author: ylavic
Date: Fri Sep 18 10:58:58 2015
New Revision: 1703807

URL: http://svn.apache.org/viewvc?rev=1703807&view=rev
Log:
mod_proxy: don't recyle backend announced "Connection: close" connections.
Failing to do this may lead to a race condition where we send a new request
before the backend really closes the connection (or lost SSL-Alert/FIN make
us think the connection is still alive, until the retransmission).

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1703807&r1=1703806&r2=1703807&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Sep 18 10:58:58 2015
@@ -1396,7 +1396,9 @@ static apr_status_t connection_cleanup(v
         apr_pool_create(&(conn->scpool), p);
         apr_pool_tag(conn->scpool, "proxy_conn_scpool");
     }
-    else if (conn->close) {
+    else if (conn->close
+                || (conn->connection
+                    && conn->connection->keepalive == AP_CONN_CLOSE)) {
         socket_cleanup(conn);
         conn->close = 0;
     }



Mime
View raw message