]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy: restore reuse of ProxyRemote connections when possible.
authorYann Ylavic <ylavic@apache.org>
Thu, 22 May 2025 14:38:41 +0000 (14:38 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 22 May 2025 14:38:41 +0000 (14:38 +0000)
commitc15471ee3bcbf6b0ae2d443d87d8a006e907295a
tree70b12cbc1cfb80f1b4285b7b12d70f07bd74413b
parentb8de59ac7ca6f2e4dfc0f3f7cf70dc5ef724530b
mod_proxy: restore reuse of ProxyRemote connections when possible.

Fixes a regression from 2.4.59 (r1913907).

For a reverse proxy setup with a worker (enablereuse=on) and a
forward/CONNECT ProxyRemote to reach it, an open connection/tunnel
to/through the remote proxy for the same origin server (and using the
same proxy auth) should be reusable. Avoid closing them like r1913534
did.

* modules/proxy/proxy_util.c:
  Rename the struct to remote_connect_info since it's only used for
  connecting through remote CONNECT proxies. Axe the use_http_connect
  field, always true.

* modules/proxy/proxy_util.c(ap_proxy_connection_reusable):
  Remote CONNECT (forward) proxy connections can be reused if the auth
  and origin server infos are the same, so conn->forward != NULL is not
  a condition to prevent reusability.

* modules/proxy/proxy_util.c(ap_proxy_determine_connection):
  Fix the checks around conn->forward reuse and connection cleanup if
  that's not possible.

Submitted by: jfclere, ylavic
GH: closes #531

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925743 13f79535-47bb-0310-9956-ffa450edef68
changes-entries/proxyremote_reuse.txt [new file with mode: 0644]
modules/proxy/proxy_util.c