Project

General

Profile

Actions

Bug #1832

closed

lighty doesn't quote spaces in urls in proxy module

Added by derstappenit over 15 years ago. Updated over 15 years ago.

Status:
Fixed
Priority:
High
Category:
mod_proxy
Target version:
ASK QUESTIONS IN Forums:

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 2 (0 open2 closed)

Related to Bug #1720: Rewrite/redirect rules and URL encodingFixedActions
Is duplicate of Bug #1827: 400 Response on any URL that countains a space character (ASCII 20)Fixeddarix2008-11-20Actions
Actions #1

Updated by icy over 15 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.

Actions #2

Updated by derstappenit over 15 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 ),
)
)
}

Actions #3

Updated by catmando over 15 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.

Actions #4

Updated by icy over 15 years ago

  • Status changed from New to Fixed

Should be fixed in r2362

Actions

Also available in: Atom