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 2003/02/24 14:13:11 UTC

DO NOT REPLY [Bug 17338] New: - mod_rewrite while proxying request appends extra r->args

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17338>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17338

mod_rewrite while proxying request appends extra r->args

           Summary: mod_rewrite while proxying request appends extra r->args
           Product: Apache httpd-1.3
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: PAF@design.ru


situation: 
  http://first [mod_rewrite+mod_proxy]
  http://second [real server]

first:
.htaccess in / contains
RewriteEngine On
RewriteRule ^(.*)$ http://second/$1 [P]

first receives request:
http://first/test/?query

second receives this:
http://second/test/%3Fquery?query

which is wrong.

currently am fixing that by deleting may-be-buggy fragment of code in 
mod_rewrite in two places:
/* make sure the QUERY_STRING
...
get incorporated
*/
when query strings get's appended to filename:
                r->filename = ap_pstrcat(r->pool, r->filename,
                                         "?", r->args, NULL);

BUT it nobody ever removes r->args, and later on mod_proxy extracts r->args, 
while r->filename actually becomes urlencoded.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org