From def22487383247a02e7244bcd12c7ea7c1079266 Mon Sep 17 00:00:00 2001 From: Mladen Turk Date: Sat, 1 Jan 2005 15:23:51 +0000 Subject: [PATCH] Close the connection for generic forward and 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index e923d04278e..78dfc5c08c8 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -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, -- 2.47.2