You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Solomon <cs...@valueclick.com> on 2004/09/21 23:54:28 UTC
[users@httpd] URL escape/unescape problems with Apache (proxy)
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
Re: [users@httpd] URL escape/unescape problems with Apache (proxy)
Posted by Nick Kew <ni...@webthing.com>.
On Tue, 21 Sep 2004, Chris Solomon wrote:
> I am having some trouble with Apache understanding an escaped url.
Do you mean http://issues.apache.org/bugzilla/show_bug.cgi?id=15207 ?
--
Nick Kew
---------------------------------------------------------------------
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