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 2002/04/11 22:25:54 UTC

DO NOT REPLY [Bug 7982] New: - mod_rewrite URL string empty when passed unicoded URL.

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

mod_rewrite URL string empty when passed unicoded URL.

           Summary: mod_rewrite URL string empty when passed unicoded URL.
           Product: Apache httpd-1.3
           Version: 1.3.23
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Other mods
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: chet@rcn.com


Users,
    First off, my relevant information:  Apache 1.3.22 (Using this version
because of single cookie bug in 23/24.) on Solaris 8.
    I am attempting to proxy a PeopleSoft web application that has the
annoying habit of constructing escaped HREF and SRC attributes like such:

http%3a%2f%2fps-web.mycorp.net%3a8800%2fservlets%2ficlientservlet%2fpeopleso
ft8portal%2f

    This causes my rewrite rules to treat it as a relative URL although it
should really be absolute.  These improperly escaped URLs end up getting
rewritten into something like this:

/servlets/psportal/peoplesoft8portal/http://ps-web.mycorp.net:8800/servlets/
iclientservlet/peoplesoft8portal/

The relevant portion of my httpd.conf:

> ServerName ps-web.mycorp.net
> Listen 8800
>
> CustomLog /path/to/apache/logs/custom.log "\n%p) %U%q\n%p) %{REWRITE}e\n"
> TransferLog /path/to/apache/logs/custom.log
>
> RewriteEngine On
> RewriteRule ^(.*)$ $1 [E=REWRITE:$1]
> RewriteRule ^/(.*)$  to://medusa.corp.rcn.net:8800/$1
> RewriteRule ^to://([^/]+)/(.*)   http://$1/$2 [E=SERVER:$1,P,L]
> RewriteRule .*  -  [F]
>
> ProxyRequests On
> NoCache *
>
> ProxyPassReverse /  http://ps-web.mycorp.net:8800/

An example log snippet showing the empty URL string mod_rewrite is seeing.
The top line is generated by the TransferLog directive, and the bottom by
the RewriteLog.

> 443)
/servlets/psportal/peoplesoft8portal/http://ps-web.mycorp.net:8800/servlets/
iclientservlet/peoplesoft8portal/
> 443) -

An example log snippet of a URL that wasn't escaped:

> 443) /servlets/iclientservlet/peoplesoft8portal/
> 443) /servlets/iclientservlet/peoplesoft8portal/

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