You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Hanson <ia...@gmail.com> on 2010/08/31 00:53:26 UTC

[users@httpd] Issue with mod_proxy encoding URL's

Hi, I have a problem with proxying certain URL's.  Using Wireshark I see the
following change in the target URL as it passed through Apache:

In to Apache proxy:
GET /arsys/forms/
remprod.com/%2BXYZ%3AChange+Password+Dialogue/Default+Admin+View/? HTTP/1.1

Out to target server:
GET /arsys/forms/
remprod.com/+XYZ:Change+Password+Dialogue/Default+Admin+View/? HTTP/1.1

The issue is that the plus (%2B) in the incoming URL is passed as a "+" when
it leaves the server.

I am able to reproduce with a proxy as simple as this:

<VirtualHost *:80>
    ServerName www.myserver.com
    ProxyRequests Off
    ProxyPreserveHost On

    ProxyPass / http://192.168.1.123/
    ProxyPassReverse / http://192.168.1.123/
</VirtualHost>

Is there some switch that I can turn on to have it properly encode the
plus?  Or, since this is the only affected URL (so far), there is some sort
of workaround that you can think of?

I searched through the bug list, but I didn't find this particular issue.  I
am running Apache 2.2.15 on RH.

Thanks in advance.

Rob

Re: [users@httpd] Issue with mod_proxy encoding URL's

Posted by Eric Covener <co...@gmail.com>.
> In to Apache proxy:
> GET
> /arsys/forms/remprod.com/%2BXYZ%3AChange+Password+Dialogue/Default+Admin+View/?
> HTTP/1.1
>
> Out to target server:
> GET
> /arsys/forms/remprod.com/+XYZ:Change+Password+Dialogue/Default+Admin+View/?
> HTTP/1.1

>
> Is there some switch that I can turn on to have it properly encode the
> plus?  Or, since this is the only affected URL (so far), there is some sort
> of workaround that you can think of?

The + is not reserved in the path part of the URL, so when mod_proxy
does a canonical encoding it doesn't unnecessarily encode the +.

Sounds like your app is applying some special, non-spec significance
to fields in the URL.  You might try reading the cautions about the
mod_proxy "nocanon" option and seeing if it helps.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org