On 30 Jun 2009, at 14:51, Will Hawes wrote:
Having played around with this a little more it looks as though when things are working properly, REQUEST_URI is the same as SCRIPT_NAME concatenated with PATH_INFO. With that in mind, perhaps revising the suggested fix to something like this:sub prepare_path { # or _fix_env? my( $self, $c ) = @_; my $env = $self->env; my $path_info = $env->{PATH_INFO} || ''; my $script_name = $env->{SCRIPT_NAME} || ''; my $request_uri = $env->{REQUEST_URI} || ''; unless( $request_uri eq $script_name . $path_info ) { delete $env->{SCRIPT_NAME}; } return $self->next::method( $c ); } To be absolutely safe we could limit it to just this OS/web server as you suggest:if( $^O eq 'MSWin32' && $env->{SERVER_SOFTWARE} =~ m{^Apache/2\. 0\.63} ) {... } Let me know your thoughts on the above and I'll get to work on it.
I'd maybe limit it to Win32 and apache (but don't be version specific) if this isn't happening to unix folks, but yeah - that looks fine, maybe pulling the logic out in the same way that has been done in the fastcgi engine?
http://github.com/orlandov/Catalyst-Engine-SCGI/tree/master Cheers t0m _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
