httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petter Olofsson" <olofsson.pet...@gmail.com>
Subject [users@httpd] Url decoding problem with the ProxyPassReverse
Date Tue, 21 Oct 2008 18:20:53 GMT
Hi,
I'm running Apache 1.3 and Resin 3.1.6 on Ubuntu.

The problem is that slashed urls forwarded to the resin server are
decoded twice, first in apache and then in resin.

Requests are going to Apache and are forwarded to the Resin server
with the ProxyPassReverse command.

The rewrite is looking like this:

RewriteCond             %{REQUEST_URI}          (.*)
RewriteRule             ^(/query(/.*)?)$        http://127.0.0.1:8080%1 [L,P]
ProxyPassReverse        /query                   http://127.0.0.1:8080/query

This works just fine when we are using a normal url, for instance:
http://localhost/query?foo=bar&search=H%20%2B%20H
In resin we can see that parameters foo is bar and search is H + H
after decoding.

When we use a slashed url, http://localhost/query/foo/bar/search/H%20%2B%20H
%2B is decoded into a '+'-sign in apache and is forwarded as such to
resin. (%20 is not decoded.)

Resin decodes the + into a space character and gives us the "search=H
 H" instead of "search=H + H" which was what we wanted.

We have tried to do an ugly quick fix  and url-encode the parameters
with +-signs in them twice, with the hope of apache decoding %252B
into just %2B. That did not work since apache is not keen on decoding
%25.

I've seen a similar question in archive
(http://httpd.markmail.org/search/?q=ProxyPassReverse%20url%20encoding#query:ProxyPassReverse%20url%20encoding+page:1+mid:pr6z2rpgqkpoq57g+state:results)
and the solution for Linde was to use an Base64 encoding, but that
isn't what I'm doing, or can one encode the url again before
forwarding the request to resin?

Thankful for any help that I can get
Regards,
Petter

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