Apache not invoking mod_proxy when there"s an encoded "" (%2F) in the path

Apache not invoking mod_proxy when there"s an encoded "" (%2F) in the path

am 15.11.2004 22:23:35 von ehansen

(sending this for the 2nd time -- first didn't show up, apologies if you receive it twice)

Hi folks,

I've set up mod_proxy as a reverse proxy and am encountering a problem.
When I browse the proxied site, most pages load fine, but if there's an
encoded '/' (%2F) in the URL's path, it causes Apache to generate an
internal 404 and not even pass the request to the mod_proxy.

Here's an example of a problem URL (note: this isn't the actual hostname):

http://www.mysite.com/Product/1917--HON+Comfortask%2f%c2%ae+ Task+Swivel+Stool--s

Note the "%2f" after the term "Comfortask", which is causing Apache to
not make this a proxy request. Unfortunately the site I'm working on
is built with an e-commerce system that puts all information in the path
rather than proper URL parameters!

FYI I've got my proxy server configured as follows:


ServerName www.mysite.com
ProxyRequests Off
ProxyPass / http://Y.Y.Y.Y:80/
ProxyPassReverse / http://Y.Y.Y.Y:80/
ProxyPassReverse / http://Y.Y.Y.Y/
ProxyTimeout 120
ProxyPreserveHost On


(X.X.X.X is the proxy server IP, and Y.Y.Y.Y is the upstream web server.)

Any ideas why Apache is getting confused by the %2F? Workarounds?

thanks,
Eric

RE: Apache not invoking mod_proxy when there"s an encoded "" (%2

am 15.11.2004 22:24:05 von Larry Toppi

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C4CB59.30C1C670
Content-Type: text/plain


Add the AllowEncodedSlashes directive in the VirtualHost to allow encoded
slashes to be used.

See http://httpd.apache.org/docs-2.0/mod/core.html#allowencodeds lashes for
more info.

Larry.

-----Original Message-----
From: Eric J. Hansen [mailto:ehansen@worldmachine.com]
Sent: Monday, November 15, 2004 4:24 PM
To: modproxy-dev@apache.org
Subject: Apache not invoking mod_proxy when there's an encoded '/' (%2F) in
the path

(sending this for the 2nd time -- first didn't show up, apologies if you
receive it twice)

Hi folks,

I've set up mod_proxy as a reverse proxy and am encountering a problem.
When I browse the proxied site, most pages load fine, but if there's an
encoded '/' (%2F) in the URL's path, it causes Apache to generate an
internal 404 and not even pass the request to the mod_proxy.

Here's an example of a problem URL (note: this isn't the actual hostname):

http://www.mysite.com/Product/1917--HON+Comfortask%2f%c2%ae+ Task+Swivel+Stoo
l--s

Note the "%2f" after the term "Comfortask", which is causing Apache to
not make this a proxy request. Unfortunately the site I'm working on
is built with an e-commerce system that puts all information in the path
rather than proper URL parameters!

FYI I've got my proxy server configured as follows:


ServerName www.mysite.com
ProxyRequests Off
ProxyPass / http://Y.Y.Y.Y:80/
ProxyPassReverse / http://Y.Y.Y.Y:80/
ProxyPassReverse / http://Y.Y.Y.Y/
ProxyTimeout 120
ProxyPreserveHost On


(X.X.X.X is the proxy server IP, and Y.Y.Y.Y is the upstream web server.)

Any ideas why Apache is getting confused by the %2F? Workarounds?

thanks,
Eric

------_=_NextPart_001_01C4CB59.30C1C670
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable




charset=3Dus-ascii">
5.5.2658.2">
RE: Apache not invoking mod_proxy when there's an encoded '/' =<br /> (%2F) in the path





Add the AllowEncodedSlashes directive in the =
VirtualHost to allow encoded slashes to be used.



See HREF=3D"http://httpd.apache.org/docs-2.0/mod/core.html#allow encodedslash=
es" =
TARGET=3D"_blank">http://httpd.apache.org/docs-2.0/mod/core. html#allowen=
codedslashes
for more info.



Larry.



-----Original Message-----

From: Eric J. Hansen [ HREF=3D"mailto:ehansen@worldmachine.com">mailto:ehansen@worl dmachine.com=
]


Sent: Monday, November 15, 2004 4:24 PM

To: modproxy-dev@apache.org

Subject: Apache not invoking mod_proxy when there's =
an encoded '/' (%2F) in the path



(sending this for the 2nd time -- first didn't show =
up, apologies if you receive it twice)



Hi folks,



I've set up mod_proxy as a reverse proxy and am =
encountering a problem.


When I browse the proxied site, most pages load =
fine, but if there's an


encoded '/' (%2F) in the URL's path, it causes =
Apache to generate an


internal 404 and not even pass the request to the =
mod_proxy.



Here's an example of a problem URL (note: this isn't =
the actual hostname):



HREF=3D"http://www.mysite.com/Product/1917--HON+Comfortask%2 f%c2%ae+Task=
+Swivel+Stool--s" =
TARGET=3D"_blank">http://www.mysite.com/Product/1917--HON+Co mfortask%2f%=
c2%ae+Task+Swivel+Stool--s



Note the "%2f" after the term =
"Comfortask", which is causing Apache to


not make this a proxy request. Unfortunately the =
site I'm working on


is built with an e-commerce system that puts all =
information in the path


rather than proper URL parameters!



FYI I've got my proxy server configured as =
follows:



<VirtualHost X.X.X.X:80>

       ServerName =
www.mysite.com


       ProxyRequests =
Off


       =
ProxyPass          &nb=
sp;           &nb=
sp;        / HREF=3D"http://Y.Y.Y.Y:80/" =
TARGET=3D"_blank">http://Y.Y.Y.Y:80/


       =
ProxyPassReverse         &n=
bsp;           &n=
bsp;  / TARGET=3D"_blank">http://Y.Y.Y.Y:80/


       =
ProxyPassReverse         &n=
bsp;           &n=
bsp;  / TARGET=3D"_blank">http://Y.Y.Y.Y/


       =
ProxyTimeout          =
            =
      120


       =
ProxyPreserveHost On


</VirtualHost>



(X.X.X.X is the proxy server IP, and Y.Y.Y.Y is the =
upstream web server.)



Any ideas why Apache is getting confused by the =
%2F?  Workarounds?



thanks,

Eric





------_=_NextPart_001_01C4CB59.30C1C670--