From cad2ca822ce63251d61994c0b78e483f62dbfd86 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Thu, 5 Jan 2012 15:41:47 +0000 Subject: [PATCH] restore the generic proxy workers to not being address-reusable. The guts of mod_proxy is not really ready for the addr and host on a proxy_conn_rec to change over time and differ from the 1 cached in the worker. * proxy_worker->cp->addr needs to know what host/port it cached * conn->addr and conn->hostname need to be allocated from their own subpool so they can be cleared as they change * ap_proxy_determine_connection needs to be more careful about which addr is the TCP endpoint and what we have in either cache. * may need to avoid updating the proxy_worker addr cache if we know the value is flipping. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227637 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 24f552e0fb9..751c88594b2 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -2447,9 +2447,9 @@ static void child_init(apr_pool_t *p, server_rec *s) ap_proxy_hashfunc(conf->forward->s->name, PROXY_HASHFUNC_FNV); /* Do not disable worker in case of errors */ conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS; + ap_proxy_initialize_worker(conf->forward, s, conf->pool); /* Disable address cache for generic forward worker */ conf->forward->s->is_address_reusable = 0; - ap_proxy_initialize_worker(conf->forward, s, conf->pool); } if (!reverse) { ap_proxy_define_worker(p, &reverse, NULL, NULL, "http://www.apache.org", 0); @@ -2462,11 +2462,11 @@ static void child_init(apr_pool_t *p, server_rec *s) ap_proxy_hashfunc(reverse->s->name, PROXY_HASHFUNC_FNV); /* Do not disable worker in case of errors */ reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS; + conf->reverse = reverse; + ap_proxy_initialize_worker(conf->reverse, s, conf->pool); /* Disable address cache for generic reverse worker */ reverse->s->is_address_reusable = 0; } - conf->reverse = reverse; - ap_proxy_initialize_worker(conf->reverse, s, conf->pool); s = s->next; } } -- 2.47.3