summaryrefslogtreecommitdiffstats
path: root/modules/proxy
diff options
context:
space:
mode:
authorJean-Frederic Clere <jfclere@apache.org>2020-06-04 10:40:10 +0200
committerJean-Frederic Clere <jfclere@apache.org>2020-06-04 10:40:10 +0200
commit8d3db8bb051ca9f6223142dcb798ebd21db5f08c (patch)
tree7f971c1487279dd3570b6417021ddb51746c469a /modules/proxy
parentAdd error checks in md_json_readb (diff)
downloadapache2-8d3db8bb051ca9f6223142dcb798ebd21db5f08c.tar.xz
apache2-8d3db8bb051ca9f6223142dcb798ebd21db5f08c.zip
make sure the $n of the regular expressions is not included the name of the worker.
for example, the example: ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com:8000$1" was giving: AH00526: Syntax error on line nnn of bla/conf/httpd.conf: ProxyPass Unable to parse URL: http://backend.example.com:8000$1 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1878467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/proxy_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index c0c19110b9..1597b9f211 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -1951,8 +1951,12 @@ PROXY_DECLARE(char *) ap_proxy_define_match_worker(apr_pool_t *p,
int do_malloc)
{
char *err;
+ char *rurl = apr_pstrdup(p, url);
+ char *pdollar = ap_strchr(rurl, '$');
- err = ap_proxy_define_worker(p, worker, balancer, conf, url, do_malloc);
+ if (pdollar != NULL)
+ *pdollar = '\0';
+ err = ap_proxy_define_worker(p, worker, balancer, conf, rurl, do_malloc);
if (err) {
return err;
}