diff options
author | Jim Jagielski <jim@apache.org> | 2005-12-11 21:36:27 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2005-12-11 21:36:27 +0000 |
commit | 48904ff464cc2f53731395cc6132082367581830 (patch) | |
tree | 6b057e1a372e553d36e6c5dd4bba9c3ad0a0426c | |
parent | ae4e235a6c1bc2bcfdac394e0f259bbde57a16ef (diff) | |
download | httpd-48904ff464cc2f53731395cc6132082367581830.tar.gz |
OK, while we ponder how best to reuse conn pools for workers,
clean this section up.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@356030 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | modules/proxy/proxy_util.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 4877e909b8..410f501711 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1825,21 +1825,15 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, uri->fragment ? uri->fragment : "", NULL); } /* + * Make sure that we pick the the correct and valid worker. * If a single keepalive connection triggers different workers, * then we have a problem (we don't select the correct one). - * Do an expensive check in this case. + * Do an expensive check in this case, where we compare the + * the hostnames associated between the two. * * TODO: Handle this much better... */ - if (!conn->hostname) { - if (proxyname) { - conn->hostname = apr_pstrdup(conn->pool, proxyname); - conn->port = proxyport; - } else { - conn->hostname = apr_pstrdup(conn->pool, uri->hostname); - conn->port = uri->port; - } - } else if (!worker->is_address_reusable || + if (!conn->hostname || !worker->is_address_reusable || (r->connection->keepalives && (r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE) && (strcasecmp(conn->hostname, uri->hostname) != 0) ) ) { |