Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67EA59EE5 for ; Thu, 5 Jan 2012 15:42:13 +0000 (UTC) Received: (qmail 4440 invoked by uid 500); 5 Jan 2012 15:42:13 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 4225 invoked by uid 500); 5 Jan 2012 15:42:11 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 4218 invoked by uid 99); 5 Jan 2012 15:42:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2012 15:42:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2012 15:42:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 08C36238897D; Thu, 5 Jan 2012 15:41:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1227637 - /httpd/httpd/trunk/modules/proxy/mod_proxy.c Date: Thu, 05 Jan 2012 15:41:47 -0000 To: cvs@httpd.apache.org From: covener@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120105154148.08C36238897D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: covener Date: Thu Jan 5 15:41:47 2012 New Revision: 1227637 URL: http://svn.apache.org/viewvc?rev=1227637&view=rev Log: 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. Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1227637&r1=1227636&r2=1227637&view=diff ============================================================================== --- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original) +++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Thu Jan 5 15:41:47 2012 @@ -2447,9 +2447,9 @@ static void child_init(apr_pool_t *p, se 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, se 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; } }