You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/01/19 22:57:56 UTC
DO NOT REPLY [Bug 33170] New: -
ProxyRemoteMatch uses remote proxy if regex does *not* match
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33170>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33170
Summary: ProxyRemoteMatch uses remote proxy if regex does *not*
match
Product: Apache httpd-2.0
Version: 2.0.52
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy
AssignedTo: bugs@httpd.apache.org
ReportedBy: ricilake@speedy.com.pe
The ProxyRemoteMatch directive is supposed to use a regex to redirect certain proxy requests to a
remote proxy server (as I understand the documentation). I actually needed that for a configuration (see
below) and was puzzled to find that it doesn't work: (line numbers from APACHE_2_0_BRANCH, because
I can't find a web interface to svn.)
389 : p2 = ap_strchr_c(ents[i].scheme, ':'); /* is it a partial URL? */
390 : if (strcmp(ents[i].scheme, "*") == 0 ||
391 : (ents[i].use_regex && ap_regexec(ents[i].regexp, url, 0,NULL, 0)) ||
392 : (p2 == NULL && strcasecmp(scheme, ents[i].scheme) == 0) ||
393 : (p2 != NULL &&
394 : strncasecmp(url, ents[i].scheme, strlen(ents[i].scheme)) == 0)) {
ap_regexec returns 0 on success, so the condition in line 391 matches if the regex didn't match, which
is the reverse of the expected behaviour. Changing line 391 to
391 : (ents[i].use_regex && ap_regexec(ents[i].regexp, url, 0,NULL, 0) == 0) ||
produced the expected behaviour.
This code seems to have been unchanged since the directive was introduced in 2.0.35, almost three
years ago, and I cannot find any relevant bug reports; in fact, googling for ProxyRemoteMatch did not
yield any indication that anyone has ever tried to use the directive, much less succeeded. This would
seem to be a reasonable case for deleting the directive
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org