diff options
author | Jan Kneschke <jan@kneschke.de> | 2005-08-31 12:55:44 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2005-08-31 12:55:44 +0000 |
commit | 79886610900e95efcbea3ee73f9f612c7788bbca (patch) | |
tree | b5a2778c47daf99d630675bf8b4d3f8ea40f019e /tests/core-condition.t | |
parent | 5c20c426b7e532602613e8796a6f8b55fa31b5ad (diff) | |
download | lighttpd-git-79886610900e95efcbea3ee73f9f612c7788bbca.tar.gz |
added tests for keep-alive and setenv and passed a ARRAY ref instead of a HASH ref
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@654 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/core-condition.t')
-rwxr-xr-x | tests/core-condition.t | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/core-condition.t b/tests/core-condition.t index 92945413..5f7d1cbd 100755 --- a/tests/core-condition.t +++ b/tests/core-condition.t @@ -22,7 +22,7 @@ GET /index.html HTTP/1.0 Host: www.example.org EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_1" } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_1" } ]; ok($tf->handle_http($t) == 0, 'config deny'); $t->{REQUEST} = ( <<EOF @@ -30,7 +30,7 @@ GET /index.html HTTP/1.0 Host: test1.example.org EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_2" } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_2" } ]; ok($tf->handle_http($t) == 0, '2nd child of chaining'); $t->{REQUEST} = ( <<EOF @@ -38,7 +38,7 @@ GET /index.html HTTP/1.0 Host: test2.example.org EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_3" } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_3" } ]; ok($tf->handle_http($t) == 0, '3rd child of chaining'); $t->{REQUEST} = ( <<EOF @@ -46,7 +46,7 @@ GET /index.html HTTP/1.0 Host: test3.example.org EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_5" } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_5" } ]; ok($tf->handle_http($t) == 0, 'nesting'); ok($tf->stop_proc == 0, "Stopping lighttpd"); @@ -59,7 +59,7 @@ GET /nofile.png HTTP/1.0 Host: www.example.org EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; ok($tf->handle_http($t) == 0, 'condition: Referer - no referer'); $t->{REQUEST} = ( <<EOF @@ -68,7 +68,7 @@ Host: www.example.org Referer: http://www.example.org/ EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; ok($tf->handle_http($t) == 0, 'condition: Referer - referer matches regex'); $t->{REQUEST} = ( <<EOF @@ -77,7 +77,7 @@ Host: www.example.org Referer: http://123.example.org/ EOF ); -$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; ok($tf->handle_http($t) == 0, 'condition: Referer - referer doesn\'t match'); ok($tf->stop_proc == 0, "Stopping lighttpd"); |