From: Mladen Turk Date: Sat, 1 Jan 2005 15:23:51 +0000 (+0000) Subject: Close the connection for generic forward and X-Git-Tag: 2.1.3~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=def22487383247a02e7244bcd12c7ea7c1079266;p=thirdparty%2Fapache%2Fhttpd.git 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 --- 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,