From 5bc539b63e56525235eda504894e7919c3c18866 Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Sat, 18 Aug 2007 10:40:20 +0000 Subject: don't send a Content-Length for 1xx, 204 and 304 (fixes #1002) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1946 152afb58-edef-0310-8abb-c4023f1b3aa9 --- tests/request.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/request.t') diff --git a/tests/request.t b/tests/request.t index cbc90e41..8ece7218 100755 --- a/tests/request.t +++ b/tests/request.t @@ -8,7 +8,7 @@ BEGIN { use strict; use IO::Socket; -use Test::More tests => 40; +use Test::More tests => 41; use LightyTest; my $tf = LightyTest->new(); @@ -381,5 +381,13 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, 'Content-Type' => 'text/html' } ]; ok($tf->handle_http($t) == 0, 'If-Modified-Since'); +$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, '-Content-Length' => '' } ]; +ok($tf->handle_http($t) == 0, 'Status 304 has no Content-Length (#1002)'); + ok($tf->stop_proc == 0, "Stopping lighttpd"); -- cgit v1.2.1