You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2005/12/11 22:36:29 UTC

svn commit: r356030 - /httpd/httpd/trunk/modules/proxy/proxy_util.c

Author: jim
Date: Sun Dec 11 13:36:27 2005
New Revision: 356030

URL: http://svn.apache.org/viewcvs?rev=356030&view=rev
Log:
OK, while we ponder how best to reuse conn pools for workers,
clean this section up.

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=356030&r1=356029&r2=356030&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Sun Dec 11 13:36:27 2005
@@ -1825,21 +1825,15 @@
                            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) ) ) {