diff options
author | Jan Kneschke <jan@kneschke.de> | 2005-08-31 23:00:04 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2005-08-31 23:00:04 +0000 |
commit | 4fc9ee0f86fbdfbd10be9815c9320678f31fcdf4 (patch) | |
tree | b8b44f0b420ebb5da84e5da028921222c60afda6 /tests/mod-fastcgi.t | |
parent | a7d25eb57734b7a02810909e4d85b2064400aa3d (diff) | |
download | lighttpd-git-4fc9ee0f86fbdfbd10be9815c9320678f31fcdf4.tar.gz |
removed duplicate test-scripts, added a test for bin-copy-env and cleaned up configfiles
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@661 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-x | tests/mod-fastcgi.t | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t index 8bcf81fd..fcda5d4d 100755 --- a/tests/mod-fastcgi.t +++ b/tests/mod-fastcgi.t @@ -7,7 +7,7 @@ BEGIN { } use strict; -use Test::More tests => 44; +use Test::More tests => 45; use LightyTest; my $tf = LightyTest->new(); @@ -52,7 +52,7 @@ EOF ok($tf->handle_http($t) == 0, 'Status + Location via FastCGI'); $t->{REQUEST} = ( <<EOF -GET /phpself.php HTTP/1.0 +GET /get-server-env.php?env=PHP_SELF HTTP/1.0 Host: www.example.org EOF ); @@ -60,15 +60,15 @@ EOF ok($tf->handle_http($t) == 0, '$_SERVER["PHP_SELF"]'); $t->{REQUEST} = ( <<EOF -GET /phpself.php/foo HTTP/1.0 +GET /get-server-env.php/foo?env=PHP_SELF HTTP/1.0 Host: www.example.org EOF ); - $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/phpself.php' } ]; + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/get-server-env.php' } ]; ok($tf->handle_http($t) == 0, '$_SERVER["PHP_SELF"]'); $t->{REQUEST} = ( <<EOF -GET /pathinfo.php/foo HTTP/1.0 +GET /get-server-env.php/foo?env=PATH_INFO HTTP/1.0 Host: www.example.org EOF ); @@ -76,7 +76,7 @@ EOF ok($tf->handle_http($t) == 0, '$_SERVER["PATH_INFO"]'); $t->{REQUEST} = ( <<EOF -GET /phphost.php HTTP/1.0 +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 Host: www.example.org EOF ); @@ -84,7 +84,7 @@ EOF ok($tf->handle_http($t) == 0, 'SERVER_NAME'); $t->{REQUEST} = ( <<EOF -GET /phphost.php HTTP/1.0 +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 Host: foo.example.org EOF ); @@ -92,7 +92,7 @@ EOF ok($tf->handle_http($t) == 0, 'SERVER_NAME'); $t->{REQUEST} = ( <<EOF -GET /phphost.php HTTP/1.0 +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 Host: vvv.example.org EOF ); @@ -100,7 +100,7 @@ EOF ok($tf->handle_http($t) == 0, 'SERVER_NAME'); $t->{REQUEST} = ( <<EOF -GET /phphost.php HTTP/1.0 +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 Host: zzz.example.org EOF ); @@ -156,7 +156,7 @@ EOF $tf->{CONFIGFILE} = 'fastcgi-10.conf'; ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die(); $t->{REQUEST} = ( <<EOF -GET /phphost.php HTTP/1.0 +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 Host: zzz.example.org EOF ); @@ -216,7 +216,7 @@ EOF } SKIP: { - skip "no php found", 3 unless -x "/home/jan/Documents/php-5.1.0b3/sapi/cgi/php"; + skip "no php found", 4 unless -x "/home/jan/Documents/php-5.1.0b3/sapi/cgi/php"; $tf->{CONFIGFILE} = 'fastcgi-13.conf'; ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die(); $t->{REQUEST} = ( <<EOF @@ -227,6 +227,16 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; ok($tf->handle_http($t) == 0, 'FastCGI + local spawning'); + $t->{REQUEST} = ( <<EOF +GET /get-env.php?env=MAIL HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 , 'HTTP-Content' => '' } ]; + ok($tf->handle_http($t) == 0, 'FastCGI + bin-copy-environment'); + + + ok($tf->stop_proc == 0, "Stopping lighttpd"); } |