]> granicus.if.org Git - apache/commitdiff
mod_proxy: don't recyle backend announced "Connection: close" connections.
authorYann Ylavic <ylavic@apache.org>
Fri, 18 Sep 2015 10:58:58 +0000 (10:58 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 18 Sep 2015 10:58:58 +0000 (10:58 +0000)
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).

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

modules/proxy/proxy_util.c

index 94eb3c20e778a734bfbe817b39ffc4e17811edc3..1aebd2467a478d3a7a5bb569736a263802481aa9 100644 (file)
@@ -1396,7 +1396,9 @@ static apr_status_t connection_cleanup(void *theconn)
         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;
     }