]> granicus.if.org Git - apache/commitdiff
Update the comment and checks around address/connection reusability
authorEric Covener <covener@apache.org>
Thu, 5 Jan 2012 15:45:01 +0000 (15:45 +0000)
committerEric Covener <covener@apache.org>
Thu, 5 Jan 2012 15:45:01 +0000 (15:45 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227642 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index e40b569498c5104bf6ac81ccb2941a81e465c3c2..e975af94bc201fec2d36d16f3943019be04217a8 100644 (file)
@@ -2020,19 +2020,17 @@ 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, 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;