httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Solomon" <csolo...@valueclick.com>
Subject [users@httpd] URL escape/unescape problems with Apache (proxy)
Date Tue, 21 Sep 2004 21:54:28 GMT

I am having some trouble with Apache understanding an escaped url.  

This is a proxy server that will be forwarding requests on to a backend apache running mod_perl.
 The proxy is:

Server: Apache/1.3.26 (Unix) mod_ssl/2.8.9 OpenSSL/0.9.6b

Here is the problem summary:

When given a request that looks like:

http://server.com/someurl?animal=horse&day=monday&link=http://www.foobar.com/tues/sep/2004

and escape it (except for the 2nd url '/' characters):

http://server.com/someurl%3Fanimal%3Dhorse%3Bday%3Dmonday%3Blink%3Dhttp%3A%2F%2Fwww.foobar.com/tues/sep/2004

When the escaped url is requested, you get a 404 and the request never reaches the backend
apache.  When logging is enabled, I get this in the proxy access log:

server.com 192.168.1.86 - - [/someurl?animal=horse;day=monday;link=http://www.foobar.com/tues/sep/2004]
[21/Sep/2004:14:43:50 -0700] "GET /someurl%3Fanimal%3Dhorse%3Bday%3Dmonday%3Blink%3Dhttp%3A%2F%2Fwww.foobar.com%2Ftues%2Fsep%2F2004
HTTP/1.1" [] 404 369 "-" "libwww-perl/5.75"

(my log format is: LogFormat "%v %h %l %u [%U] %t \"%r\" [%q] %>s %b \"%{'{Referer}'}i\"
\"%{'{User-Agent}'}i\"")

But, if I just don't escape the '://' characters in the 'link' param:

http://server.com/someurl%3Fanimal%3Dhorse%3Bday%3Dmonday%3Blink%3Dhttp://www.foobar.com/tues/sep/2004

Then the proxy reads (and unescapes) the url correctly and everything works great.  Unfortunately
this isn't a viable solution.

As you can see from the entry in the proxy access log, the url -seems- to be getting decoded
properly, but that may just be happening after the request phase, and may be happening in
the log phase, I don't know.

any ideas on why the escaped "://" is causing a problem?

thanks,

Chris

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


Mime
View raw message