summaryrefslogtreecommitdiff
path: root/tests/core-request.t
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2007-06-15 14:08:32 +0000
committerJan Kneschke <jan@kneschke.de>2007-06-15 14:08:32 +0000
commit9e4e4f7e1a7a38a5da9ad1b7286bbbd30e372c24 (patch)
tree0f36445ce58cd1905e5f7e1ddcd832562b8ab00c /tests/core-request.t
parent991ebdf36f75606964b2e791cc6c091f1271f4cd (diff)
downloadlighttpd1.4-9e4e4f7e1a7a38a5da9ad1b7286bbbd30e372c24.tar.gz
lighttpd1.4-9e4e4f7e1a7a38a5da9ad1b7286bbbd30e372c24.zip
fixed remote crash on duplicate header keys with line-wrapping (fixes #1230)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1869 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/core-request.t')
-rwxr-xr-xtests/core-request.t34
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/core-request.t b/tests/core-request.t
index 27edafa9..8d363a49 100755
--- a/tests/core-request.t
+++ b/tests/core-request.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
-use Test::More tests => 33;
+use Test::More tests => 36;
use LightyTest;
my $tf = LightyTest->new();
@@ -273,6 +273,38 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
ok($tf->handle_http($t) == 0, 'uppercase filenames');
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Location: foo
+Location: foobar
+ baz
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, '#1209 - duplicate headers with line-wrapping');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Location:
+Location: foobar
+ baz
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, '#1209 - duplicate headers with line-wrapping - test 2');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+A:
+Location: foobar
+ baz
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, '#1209 - duplicate headers with line-wrapping - test 3');
+
+
+
ok($tf->stop_proc == 0, "Stopping lighttpd");