You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <ju...@erenkrantz.com> on 2005/12/07 17:24:12 UTC

Re: svn commit: r354779 - /httpd/httpd/branches/2.2.x/STATUS

On Wed, Dec 07, 2005 at 03:48:39PM -0000, jim@apache.org wrote:
> +    * proxy_util: Fix case where a shared keepalive connection results in
> +      different (and incorrect) workers from being accessed.
> +      http://svn.apache.org/viewcvs.cgi/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=350250&view=diff&r1=350250&r2=332306
> +      +1: jim

In reviewing this, I can't for the life of me figure out why there's an if
and else check that has the exact same body.  Can't we just do:

if (!conn->hostname || !worker->is_address_reusable ||
    (r->connection->keepalives &&
     (r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE) &&
     (strcasecmp(conn->hostname, uri->hostname) != 0))) {
   ....
}

With a conditional like this, it'd probably be nice to have the conditional
tests in a comment so that we can understand the check that it's doing.  =)

Or, am I missing something?  -- justin

Re: svn commit: r354779 - /httpd/httpd/branches/2.2.x/STATUS

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Wed, Dec 07, 2005 at 11:29:57AM -0500, Jim Jagielski wrote:
> The sole reason was the keep the present setup, so that if
> is_address_reusable becomes more "accurate" we don't loose
> information on what was the original intent... I'd also

Can you please elaborate on that?  Thanks.  -- justin