]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy: Ignore (and warn about) enablereuse=on for ProxyPassMatch when
authorYann Ylavic <ylavic@apache.org>
Tue, 11 Oct 2022 09:53:04 +0000 (09:53 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 11 Oct 2022 09:53:04 +0000 (09:53 +0000)
commitc74bf2f82190e850782bf0d1ac16613d5c8266a6
tree76d4bd7bc53e17ad92ed341818f819bfcdf4b340
parent3d291e243d0c75bff465748bd602ea1431dc8d43
mod_proxy: Ignore (and warn about) enablereuse=on for ProxyPassMatch when
           some dollar substitution (backreference) happens in the hostname
           or port part of the URL.

Address or connection reuse can't work when the autority part of the URL is
dynamic (single origin server[:port] handled/assumed in the reslist). Detect
such cases and unset worker->s->is_address_reusable to disable reuse regardless
of enablereuse/disablereuse.

* modules/proxy/proxy_util.c(ap_proxy_define_worker_ex):
  Lookup for $n substitution in the hostname[:port] when parsing the URL and
  if present, set worker->->is_address_reusable=0 / worker->s->disablereuse=1.

* modules/proxy/proxy_util.c(ap_proxy_initialize_worker):
  Don't overwrite worker->s->is_address_reusable from enablereuse/disablereuse
  parameters, and set both consistently.

* docs/manual/mod/mod_proxy.xml:
  Add ProxyPassMatch compatibility note about key=value parameters handled with
  $n substitutions since 2.4.47.
  Document the specificities of enablereuse/disablereuse w.r.t. $n subsitutions
  in the different part of the URL.
  Axe the note about unparsable URLs when the $n substitution happens in the
  port, this has been addressed in 2.4.47 too (and works now).

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