Project

General

Profile

Bug #1832

lighty doesn't quote spaces in urls in proxy module

Added by derstappenit almost 9 years ago. Updated almost 9 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
Category:
mod_proxy
Target version:
Start date:
2008-11-26
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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


Related issues

Related to Bug #1720: Rewrite/redirect rules and URL encodingNeed Feedback

Is duplicate of Bug #1827: 400 Response on any URL that countains a space character (ASCII 20)Fixed2008-11-20

History

#1

Updated by icy almost 9 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.

#2

Updated by derstappenit almost 9 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 ),
)
)
}

#3

Updated by catmando almost 9 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.

#4

Updated by icy almost 9 years ago

  • Status changed from New to Fixed

Should be fixed in r2362

Also available in: Atom