You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jf...@apache.org on 2020/06/04 08:40:10 UTC
svn commit: r1878467 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Author: jfclere
Date: Thu Jun 4 08:40:10 2020
New Revision: 1878467
URL: http://svn.apache.org/viewvc?rev=1878467&view=rev
Log:
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
Modified:
httpd/httpd/trunk/modules/proxy/proxy_util.c
Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1878467&r1=1878466&r2=1878467&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Thu Jun 4 08:40:10 2020
@@ -1951,8 +1951,12 @@ PROXY_DECLARE(char *) ap_proxy_define_ma
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;
}