It seems to me that is_address_reusable should be
assumed to be 0 if either
(r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE)
As mentioned, we go ahead and force close the socket
anyway, the problem is that conn->hostname still
points to the wrong element. So:
if (r->proxyreq == PROXYREQ_PROXY || r->proxyreq ==
PROXYREQ_REVERSE ||
!worker->is_address_reusable) {
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;
}
}
is likely a good enough fix, until we add better logic to
the whole backend/pool/keepalive structure.
On Nov 22, 2005, at 7:25 AM, Hansjoerg Pehofer wrote:
Rüdiger, Jim,
I used the tarball from http://people.apache.org/~pquerna/dev/
httpd-2.1.10/.
Ruediger Pluem <[EMAIL PROTECTED]> writes:
[...]
I think the real problem happens if you have requests to different
backends (webapp-cluster, axkit-cluster) on one
shared keepalive connection to the reverse proxy.
So having something like
GET /library/q
and
GET /anything
served over the same keepalive connection between client and
reverse proxy should cause trouble, because of
if (!r->main) {
backend = (proxy_conn_rec *) ap_get_module_config(c-
>conn_config,
&proxy_http_module);
}
starting at line 1668 of mod_proxy_http.c which gets the previous
backend
connection. Although the socket to the backend is closed for
Reverse Proxy Requests
in ap_proxy_determine_connection of line 1856 of proxy_util.c, the
new connection
gets created to the same address in line 2010 of proxy_util.c
(ap_proxy_connect_backend).
I have not found the time to search for a solution.
Just as a check to my theory can you disable keepalives and see if
everything works correctly
then?
You are right, it works correctly with KeepAlive Off.
Thanks,
Hansjörg
- --
IT Services University of Innsbruck
CFB4 D6E7 33F4 34C0 18B9 6661 E355 4337 3F8B D9C2
http://purl.org/net/hansjoerg.pehofer/public_key