diff options
author | mOo <moo.lighttpd@gmail.com> | 2005-09-29 14:42:35 +0000 |
---|---|---|
committer | mOo <moo.lighttpd@gmail.com> | 2005-09-29 14:42:35 +0000 |
commit | 9be1abfb85fb7b572c36ab62bdb904a9f2e4799b (patch) | |
tree | f905a00757b90e635c272e1edb305b1d5c23ecdf /tests/core-condition.t | |
parent | 33320eba678d9dcf1a97d8e7ed25798e849a6afd (diff) | |
download | lighttpd-git-9be1abfb85fb7b572c36ab62bdb904a9f2e4799b.tar.gz |
an unset header is now treat as empty_string "" to make the conditional logic correct.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@757 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/core-condition.t')
-rwxr-xr-x | tests/core-condition.t | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/core-condition.t b/tests/core-condition.t index 13b33df2..96b05d87 100755 --- a/tests/core-condition.t +++ b/tests/core-condition.t @@ -110,27 +110,30 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 }, { ' ok($tf->handle_http($t) == 0, 'remote ip cache (#255)'); $t->{REQUEST} = ( <<EOF -GET /empty-ref.jpg HTTP/1.0 +GET /empty-ref.noref HTTP/1.0 +Cookie: empty-ref EOF ); $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; -ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: is no set'); +ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer is no set'); $t->{REQUEST} = ( <<EOF -GET /empty-ref.jpg HTTP/1.0 +GET /empty-ref.noref HTTP/1.0 +Cookie: empty-ref Referer: EOF ); $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; -ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: is no set'); +ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer is empty'); $t->{REQUEST} = ( <<EOF -GET /empty-ref.jpg HTTP/1.0 +GET /empty-ref.noref HTTP/1.0 +Cookie: empty-ref Referer: foobar EOF ); $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; -ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: is no set'); +ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: foobar'); ok($tf->stop_proc == 0, "Stopping lighttpd"); |