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 CE76E9005 for ; Thu, 5 Jan 2012 15:45:24 +0000 (UTC) Received: (qmail 9316 invoked by uid 500); 5 Jan 2012 15:45:24 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 9217 invoked by uid 500); 5 Jan 2012 15:45:23 -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 9210 invoked by uid 99); 5 Jan 2012 15:45:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2012 15:45:23 +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:45:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 556822388993; Thu, 5 Jan 2012 15:45:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1227642 - /httpd/httpd/trunk/modules/proxy/proxy_util.c Date: Thu, 05 Jan 2012 15:45:02 -0000 To: cvs@httpd.apache.org From: covener@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120105154502.556822388993@eris.apache.org> Author: covener Date: Thu Jan 5 15:45:01 2012 New Revision: 1227642 URL: http://svn.apache.org/viewvc?rev=1227642&view=rev Log: Update the comment and checks around address/connection reusability in mod_proxy. The checks and comment are a vestige of 2.0.x mod_proxy_http where the backend proxy conn was stored in the frontend r->conn_config, but ap_proxy_determine_connection() doesn't associate the frontend and backend conns like this. Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1227642&r1=1227641&r2=1227642&view=diff ============================================================================== --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original) +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Thu Jan 5 15:45:01 2012 @@ -2020,19 +2020,17 @@ ap_proxy_determine_connection(apr_pool_t 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, where we compare the - * the hostnames associated between the two. + * Figure out if our passed in proxy_conn_rec has a usable + * address cached. * - * TODO: Handle this much better... + * TODO: Handle this much better... + * + * XXX: If generic workers are ever address-reusable, we need + * to check host and port on the conn and be careful about + * spilling the cached addr from the worker. */ if (!conn->hostname || !worker->s->is_address_reusable || - worker->s->disablereuse || - (r->connection->keepalives && - (r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE) && - (strcasecmp(conn->hostname, uri->hostname) != 0) ) ) { + worker->s->disablereuse) { if (proxyname) { conn->hostname = apr_pstrdup(conn->pool, proxyname); conn->port = proxyport;