X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Foptional_lighttpd-fastcgi.t;fp=t%2Foptional_lighttpd-fastcgi.t;h=74e768dba12d14927010d37efd134182697cb023;hp=1d3ca400625d67ff5646c4b3db0a2dcc434c2dbb;hb=e91462552b2ba10034c82a4c981fe63dfeb57a6e;hpb=eebd1520470f767fdefdc03c1fe05427e5f182f9 diff --git a/t/optional_lighttpd-fastcgi.t b/t/optional_lighttpd-fastcgi.t index 1d3ca40..74e768d 100644 --- a/t/optional_lighttpd-fastcgi.t +++ b/t/optional_lighttpd-fastcgi.t @@ -32,6 +32,13 @@ chomp $lighttpd_bin; plan skip_all => 'Please set LIGHTTPD_BIN to the path to lighttpd' unless $lighttpd_bin && -x $lighttpd_bin; +my $fix_scriptname = ''; +if (my ($vmajor, $vminor, $vpatch) = `"$lighttpd_bin" -v` =~ /\b(\d+)\.(\d+)\.(\d+)\b/) { + if ($vmajor > 1 || ($vmajor == 1 && ("$vminor.$vpatch" >= 4.23))) { + $fix_scriptname = '"fix-root-scriptname" => "enable",'; + } +} + plan tests => 1; # this creates t/tmp/TestApp @@ -64,7 +71,7 @@ server.port = $port # catalyst app specific fcgi setup fastcgi.server = ( - "" => ( + "/" => ( "FastCgiTest" => ( "socket" => "$docroot/test.socket", "check-local" => "disable", @@ -72,6 +79,7 @@ fastcgi.server = ( "min-procs" => 1, "max-procs" => 1, "idle-timeout" => 20, + $fix_scriptname "bin-environment" => ( "PERL5LIB" => "$perl5lib" )