]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy: Avoid confusion of prefix/regex matching workers at loading. PR 65429.
authorYann Ylavic <ylavic@apache.org>
Mon, 5 Jul 2021 16:23:33 +0000 (16:23 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 5 Jul 2021 16:23:33 +0000 (16:23 +0000)
commit20dd120ce4c0ea1329f6faef0bd3b13536e3c34c
tree66270b7cf21250a71b6b584f206d78e1483724c3
parent71736a1f426c17a497ea4f40cdcca6da96a30d89
mod_proxy: Avoid confusion of prefix/regex matching workers at loading.  PR 65429.

ap_proxy_get_worker() needs to know whether it should lookup for prefix or
match or both matching workers, depending on the context.

For instance <Proxy[Match]> or ProxyPass[Match] directives need to lookup for
an existing worker with the same type as the directive (*Match or not), because
they will define one with that matching type if none exists.

On the contrary, "ProxySet <url>" at load time or ap_proxy_pre_request() at run
time need to find a worker matching an url whether it's by prefix or by regex.

So this commit adds ap_proxy_get_worker_ex() which takes a bitmask for the
matching type and calls it appropriately where needed.

For consistency, ap_proxy_define_worker_ex() is also added, using the same
bitmask flags, deprecating ap_proxy_define_match_worker().

Follow up to r1891206.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891284 13f79535-47bb-0310-9956-ffa450edef68
include/ap_mmn.h
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h
modules/proxy/proxy_util.c