]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Close the connection for generic forward and
authorMladen Turk <mturk@apache.org>
Sat, 1 Jan 2005 15:23:51 +0000 (15:23 +0000)
committerMladen Turk <mturk@apache.org>
Sat, 1 Jan 2005 15:23:51 +0000 (15:23 +0000)
reverse proxy workers.

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

modules/proxy/proxy_util.c

index e923d04278e37bfa49578535f3e4026afb6e7952..78dfc5c08c8bf5fa1f6189adce9df82f0bf4269a 100644 (file)
@@ -1658,9 +1658,17 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
             conn->port = uri->port;
         }
     }
-    /* TODO: add address cache for forward proxies */
+    /* TODO: add address cache for generic forward proxies.
+     * At least level 0 -> compare with previous hostname:port
+     */
     if (r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE ||
         !worker->is_address_reusable) {
+        /* TODO: Check if the connection can be reused
+         */
+        if (conn->connection) {
+            conn->close = 1;
+            ap_proxy_release_connection("*", conn, r->server);
+        }
         err = apr_sockaddr_info_get(&(conn->addr),
                                     conn->hostname, APR_UNSPEC,
                                     conn->port, 0,