From c74bf2f82190e850782bf0d1ac16613d5c8266a6 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Tue, 11 Oct 2022 09:53:04 +0000 Subject: 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 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes-entries/enablereuse.txt (limited to 'changes-entries') diff --git a/changes-entries/enablereuse.txt b/changes-entries/enablereuse.txt new file mode 100644 index 0000000000..b8e1a3f617 --- /dev/null +++ b/changes-entries/enablereuse.txt @@ -0,0 +1,3 @@ + *) 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. [Yann Ylavic] -- cgit v1.2.1