summaryrefslogtreecommitdiff
path: root/tests/request.t
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-11-29 14:13:13 +0000
committerStefan Bühler <stbuehler@web.de>2009-11-29 14:13:13 +0000
commit48fea286515d00c8ea1b3c8dd2eacf5a8dcc9b61 (patch)
tree5d565358f1c2ce6a9eb18ce71f1a0f6042338004 /tests/request.t
parentb5a76921e4d066fe93985ec5f8968f94bc2fc30c (diff)
downloadlighttpd-git-48fea286515d00c8ea1b3c8dd2eacf5a8dcc9b61.tar.gz
Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2696 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/request.t')
-rwxr-xr-xtests/request.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/request.t b/tests/request.t
index 0a35f571..1960f5d6 100755
--- a/tests/request.t
+++ b/tests/request.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
-use Test::More tests => 41;
+use Test::More tests => 42;
use LightyTest;
my $tf = LightyTest->new();
@@ -389,5 +389,14 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, '-Content-Length' => '' } ];
ok($tf->handle_http($t) == 0, 'Status 304 has no Content-Length (#1002)');
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Host: 123.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain' } ];
+$t->{SLOWREQUEST} = 1;
+ok($tf->handle_http($t) == 0, 'GET, slow \\r\\n\\r\\n (#2105)');
+
ok($tf->stop_proc == 0, "Stopping lighttpd");