mod_proxy: Fix selection of ProxyPassMatch workers with host/port substitution. PR 69233.

With "ProxyPassMatch ^/([^/]+)/(.*)$ https://$1/$2", ap_proxy_get_worker_ex()
should not consider the length of scheme://host part of the given URL because
of the globbing match on the host part.

Fix it by setting worker->s>is_host_matchable when creating a worker with host
substitution and avoiding the min_match check in worker_matches() in this case.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919617 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yann Ylavic
2024-08-01 11:35:26 +00:00
parent 0838e04da4
commit 2f1f9c5df0
4 changed files with 22 additions and 14 deletions

View File

@ -731,6 +731,7 @@
* and AP_REQUEST_TRUSTED_CT BNOTE.
* 20211221.24 (2.5.1-dev) Add ap_proxy_fixup_uds_filename()
* 20211221.25 (2.5.1-dev) AP_SLASHES and AP_IS_SLASH
* 20211221.26 (2.5.1-dev) Add is_host_matchable to proxy_worker_shared
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
@ -738,7 +739,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20211221
#endif
#define MODULE_MAGIC_NUMBER_MINOR 25 /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 26 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a