From 48fea286515d00c8ea1b3c8dd2eacf5a8dcc9b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Sun, 29 Nov 2009 14:13:13 +0000 Subject: 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 --- tests/request.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/request.t') 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} = ( <{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"); -- cgit v1.2.1