diff options
author | Stefan Bühler <stbuehler@web.de> | 2012-04-19 13:02:11 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2012-04-19 13:02:11 +0000 |
commit | 7187271fb66ee621ba397219998a13466d2ad2d5 (patch) | |
tree | 5ca57bc72c74e0f9a4b261291f339e64fefb0866 /tests/mod-fastcgi.t | |
parent | 61047369c7f8456c13d4a667ea0fa6e74871e2c8 (diff) | |
download | lighttpd-git-7187271fb66ee621ba397219998a13466d2ad2d5.tar.gz |
[auth] Add "AUTH_TYPE" environment (for *cgi), remove fastcgi specific workaround, add fastcgi test case (fixes #889)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2833 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-x | tests/mod-fastcgi.t | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t index 64cf63da..691bce2e 100755 --- a/tests/mod-fastcgi.t +++ b/tests/mod-fastcgi.t @@ -7,7 +7,7 @@ BEGIN { } use strict; -use Test::More tests => 56; +use Test::More tests => 58; use LightyTest; my $tf = LightyTest->new(); @@ -25,7 +25,7 @@ SKIP: { } SKIP: { - skip "no PHP running on port 1026", 33 unless $tf->listening_on(1026); + skip "no PHP running on port 1026", 35 unless $tf->listening_on(1026); ok($tf->start_proc == 0, "Starting lighttpd") or goto cleanup; @@ -188,6 +188,24 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ]; ok($tf->handle_http($t) == 0, 'X-Sendfile2'); + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=REMOTE_USER HTTP/1.0 +Host: auth.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'des' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["REMOTE_USER"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=AUTH_TYPE HTTP/1.0 +Host: auth.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'Basic' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["AUTH_TYPE"]'); + ok($tf->stop_proc == 0, "Stopping lighttpd"); |