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=29678>. 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=29678 mod_rewrite used with authentication and mod_proxy returns an incorrect status code. Summary: mod_rewrite used with authentication and mod_proxy returns an incorrect status code. Product: Apache httpd-2.0 Version: 2.0.49 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: mod_rewrite AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Accessing a URI rewritten with the [P] flag by a proxy set up to require authentication yields a 401 (Authentication Required) and not a 407 (Proxy Authentication Required) response. More generally, mod_rewrite flags every [P] request it processes as a PROXYREQ_REVERSE; when the request in question is already being handled through the normal proxy, it is more appropriate to leave it as PROXYREQ_PROXY. The patch below (against 2.0.49) fixes the issue for me. --- httpd-2.0.49.old/modules/mappers/mod_rewrite.c Mon Feb 9 14:53:18 2004 +++ httpd-2.0.49/modules/mappers/mod_rewrite.c Thu Jun 17 13:34:33 2004 @@ -1202,8 +1202,11 @@ "?", r->args, NULL); } - /* now make sure the request gets handled by the proxy handler */ - r->proxyreq = PROXYREQ_REVERSE; + /* now make sure the request gets handled by the proxy handler. + Forward-proxy requests shouldn't get relabeled */ + if(PROXYREQ_PROXY != r->proxyreq) + r->proxyreq = PROXYREQ_REVERSE; + r->handler = "proxy-server"; rewritelog(r, 1, "go-ahead with proxy request %s [OK]", --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
