diff options
author | Stefan Bühler <stbuehler@web.de> | 2009-04-01 17:35:17 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2009-04-01 17:35:17 +0000 |
commit | ce39062dd260960e927be6344a71eca4b0bef314 (patch) | |
tree | 716365970dc45a99b04792a985a919504e5e9b6a /tests/mod-fastcgi.t | |
parent | 61332595cb69bd8315f610920fe3879ebc9fe421 (diff) | |
download | lighttpd-git-ce39062dd260960e927be6344a71eca4b0bef314.tar.gz |
Fix workaround for incorrect path info/scriptname if fastcgi prefix is "/" (fixes #729)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2421 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-x | tests/mod-fastcgi.t | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t index f0ae0b48..e5057bd9 100755 --- a/tests/mod-fastcgi.t +++ b/tests/mod-fastcgi.t @@ -7,7 +7,7 @@ BEGIN { } use strict; -use Test::More tests => 50; +use Test::More tests => 52; use LightyTest; my $tf = LightyTest->new(); @@ -166,7 +166,7 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/foo/bar' } ]; ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); - + ok($tf->stop_proc == 0, "Stopping lighttpd"); @@ -282,7 +282,7 @@ EOF SKIP: { - skip "no fcgi-responder found", 9 unless -x $tf->{BASEDIR}."/tests/fcgi-responder" || -x $tf->{BASEDIR}."/tests/fcgi-responder.exe"; + skip "no fcgi-responder found", 11 unless -x $tf->{BASEDIR}."/tests/fcgi-responder" || -x $tf->{BASEDIR}."/tests/fcgi-responder.exe"; $tf->{CONFIGFILE} = 'fastcgi-responder.conf'; ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die(); @@ -319,6 +319,23 @@ EOF ok($tf->handle_http($t) == 0, 'line-ending \r\n + \r\n'); $t->{REQUEST} = ( <<EOF +GET /abc/def/ghi?path_info HTTP/1.0 +Host: wsgi.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/abc/def/ghi' } ]; + ok($tf->handle_http($t) == 0, 'PATH_INFO (wsgi)'); + + $t->{REQUEST} = ( <<EOF +GET /abc/def/ghi?script_name HTTP/1.0 +Host: wsgi.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '' } ]; + ok($tf->handle_http($t) == 0, 'SCRIPT_NAME (wsgi)'); + + + $t->{REQUEST} = ( <<EOF GET /index.fcgi?die-at-end HTTP/1.0 Host: www.example.org EOF |