diff options
author | mOo <moo.lighttpd@gmail.com> | 2005-09-20 05:54:19 +0000 |
---|---|---|
committer | mOo <moo.lighttpd@gmail.com> | 2005-09-20 05:54:19 +0000 |
commit | 14754f33f40e3399236c0ca2282271f2bb929282 (patch) | |
tree | cdcca6aede2f4d5a3ddfa8e27b5d8483285ccab0 /tests/core-condition.t | |
parent | 4f1b2f8ca0661c6db4a0a9d36b43ffac202d3d3c (diff) | |
download | lighttpd-git-14754f33f40e3399236c0ca2282271f2bb929282.tar.gz |
fix and add testcase for #255
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@716 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/core-condition.t')
-rwxr-xr-x | tests/core-condition.t | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/core-condition.t b/tests/core-condition.t index 3e7e8ad9..4ca1f379 100755 --- a/tests/core-condition.t +++ b/tests/core-condition.t @@ -71,18 +71,6 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; ok($tf->handle_http($t) == 0, 'condition: Referer - referer matches regex'); -TODO: { - local $TODO = "referer matching in conditionals"; - $t->{REQUEST} = ( <<EOF -GET /nofile.png HTTP/1.0 -Host: referer.example.org -Referer: http://evil-referer.example.org/ -EOF - ); - $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; - ok($tf->handle_http($t) == 0, 'condition: Referer - referer doesn\'t match'); -} - $t->{REQUEST} = ( <<EOF GET /image.jpg HTTP/1.0 Host: www.example.org @@ -109,6 +97,17 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; ok($tf->handle_http($t) == 0, 'condition: Referer - referer doesn\'t match'); +$t->{REQUEST} = ( <<EOF +GET /nofile HTTP/1.1 +Host: bug255.example.org + +GET /nofile HTTP/1.1 +Host: bug255.example.org +Connection: close +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 }, { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 } ]; +ok($tf->handle_http($t) == 0, 'remote ip cache (#255)'); ok($tf->stop_proc == 0, "Stopping lighttpd"); |