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 2007/09/18 13:50:32 UTC

DO NOT REPLY [Bug 43319] - when combined with mod_proxy, mod_rewrite NE flag does not work correctly

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=43319>.
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=43319





------- Additional Comments From rahul@sun.com  2007-09-18 04:50 -------
Created an attachment (id=20843)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20843&action=view)
A patch to let mod_rewrite flags P and NE co-exist.

The problem with mod_proxy (P) flag is that in 
mod_rewrite:hook_uri2file(request_rec *r)
the rulestatus != ACTION_NOESCAPE is checked only in the case when it is not a
proxy. while there is nothing done when it is a proxy.

On the other hand, the mod_proxy escapes any and every URLs that it gets. 
so the URL that we passed in with NE gets munged by mod_proxy.

The fix is to check for ACTION_NOESCAPE in the if proxy section of 
mod_rewrite:hook_uri2file(request_rec *r), and set the r->notes
apr_table_setn(r->notes, "mod_proxy:flags","NE");

and in mod_proxy_http:proxy_http_canon which is responsible for escaping HTTP
URLs, we check for the above flag's existence and if it is there, we let the
URL path in with out escaping.

The reason notes is named mod_proxy:flags rather than mod_rewrite:flags is
that the same flags may be made use of by some other module that needs proxy
functionality with out the escaping.


-- 
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