[Catalyst] request uri under lighttpd/fastcgi contains extra slash

Andy Grundman andy at hybridized.org
Fri Nov 9 16:48:19 GMT 2007


On Nov 9, 2007, at 11:26 AM, Jim Spath wrote:

> When I run Catalyst out of a non root webserver location, e.g. / 
> myapp, $c->request->uri has an extra slash after the base url.
>
>  http://mydomain.com/myapp//
>  http://mydomain.com/myapp//some/action
>
> Catalyst::Engine::CGI::prepare_path() is setting $base_path to / 
> myapp/, which is correct, but then to create the full path used in  
> $c->request->uri, it appends $ENV{PATH_INFO} to this base_path,  
> which appears to always begin with a slash, resulting in the double  
> slash I am seeing.
>
> FYI, my lighttpd fastcgi config looks like:
>
> $HTTP["url"] =~ "^/myapp/(?!static)" {
>  fastcgi.server = (
>   "/myapp" => (
>     "MyApp" => (
>       ...
>     ),
>   ),
>  ),
> }
>
> and I am currently running Catalyst 5.7007.  I'd prefer a solution  
> that doesn't involve upgrading Catalyst... if that is possible.

Please at least test your app with the latest Catalyst version.   
There's a reason we put out new releases, to fix bugs like this one. :)

I just ran our test suite against lighttpd 1.4.18 and the latest  
Catalyst with a non-root path and it is fully passing.

-Andy



More information about the Catalyst mailing list