Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For these workers' URLs, the dollars (plus the following digit) could be replaced by a wildcard (ie. *) and ap_proxy_get_worker() could then use ap_strcasecmp_match() against the requested URL.
Regards, Yann. On Tue, Mar 18, 2014 at 12:26 PM, Jan Kaluza <[email protected]> wrote: > This is also needed to fix ProxyPassMatch with UDS. Without this patch > following configuration does not work: > > ProxyPassMatch ^/web/(.*\.php)$ > unix:/run/php-fpm/fpm.sock|fcgi://127.0.0.1/var/www/html/$1 > > If nobody is against, I will commit it to trunk later this week. > > Regards, > Jan Kaluza > > > On 09/16/2013 02:44 PM, Jan Kaluža wrote: >> >> Hi, >> >> I have found out that if you use ProxyPassMatch with regexp and "$1" >> (see PR 43513 and PR 54973), the right proxy_worker is not used and >> "reverse" proxy_worker is used instead. The result is situation where no >> options like "timeout" can be set in this case. >> >> The real problem here is that proxy_worker is chosen according to its >> name which contains "$1" sequence in our case. >> >> I have found out that there is already patch fixing ProxyPassMatch >> behaviour with "$1" in PR 43513. I have rebased the patch for trunk and >> changed its style a bit. >> >> The patch strips everything after "$", so it for example changes the >> name of proxy_worker from "http://127.0.0.1/cgi-bin/$1" to >> "http://127.0.0.1/cgi-bin/". Later when request arrives, proper >> proxy_worker is chosen. Without this change, proxy_worker's name with >> "$1" would be compared against real request URL, but real request URL >> does not contain this "$1" sequence and therefore this correct >> proxy_worker wouldn't be chosen. >> >> Do you see any problems with this patch? >> >> Regards, >> Jan Kaluza > >
