Bug #1832
closedlighty doesn't quote spaces in urls in proxy module
Description
hello,
lighty doesn't quote spaces in urls. So if i have an url like "/test space.html" lighty should quote this to "/test%20space.html" before transport to zope server.
my virtual host config:
$HTTP["host"] == "www.example.de" {
url.rewrite-once = ( "^/(.*)$" =>
"/VirtualHostBase/http/www.example.de:80/Plone/VirtualHostRoot/$1" )
proxy.balance = "hash"
proxy.server = ( "/VirtualHostBase" =>
(
( "host" => "127.0.0.1", "port" => 8080 )
)
)
}
The zope server give me an Error 400, bad request if i try to load an url with spaces. :-(
regards maik
Updated by icy about 16 years ago
I think that might be due to a regression from a recent patch.
Could you try adding a rewrite rule after your existing one like the following:
url.rewrite-repeat = ("^(.*) (.*)$" => "$1%20$2")
It's just an idea but it could help encoding (not quoting) all spaces to %20.
Updated by derstappenit about 16 years ago
icy wrote:
I think that might be due to a regression from a recent patch.
Could you try adding a rewrite rule after your existing one like the following:
url.rewrite-repeat = ("^(.*) (.*)$" => "$1%20$2")
It's just an idea but it could help encoding (not quoting) all spaces to %20.
thx for your very fast answer :-)
but the error is the same:
my test host:
server.modules += ( "mod_proxy" )
$HTTP["host"] == "load.neuhaus-elbe.de" {
url.rewrite-once = ( "^/(.*)$" => "/VirtualHostBase/http/load.neuhaus-elbe.de:80/hosts/neuhaus-elbe.de/VirtualHostRoot/$1" )
url.rewrite-repeat = ("^(.*) (.*)$" => "$1%20$2")
proxy.server = ( "/VirtualHostBase" =>
(
( "host" => "10.1.0.112", "port" => 9814 ),
)
)
}
Updated by catmando about 16 years ago
- Target version set to 1.4.21
Already reported:
http://redmine.lighttpd.net/issues/show/1827
The bug is actually not in mod_proxy, but rather mod_rewrite. I gather that there is a patch available, which will revert mod_rewrite to the previous version's behavior; unfortunately I've lost the link.
I will ask on IRC and erport back if I have any luck.
I'm guessing that you may be running into a problem with one folder in particular (Plone Default). As a temporary workaround you could create a new template called Plone_Default and use that as the default.
This release has not been the greatest success, but the only way we're going to make the situation better is by getting more involved, especially with testing.
Also available in: Atom