diff options
author | Jan Kneschke <jan@kneschke.de> | 2007-08-18 10:40:20 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2007-08-18 10:40:20 +0000 |
commit | 5bc539b63e56525235eda504894e7919c3c18866 (patch) | |
tree | 399ded4d8ffbb9870277979ee1fa914981226f64 /tests/request.t | |
parent | c4e3150283f81fc4a87c600f2d19634c39934a7b (diff) | |
download | lighttpd-git-5bc539b63e56525235eda504894e7919c3c18866.tar.gz |
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
Diffstat (limited to 'tests/request.t')
-rwxr-xr-x | tests/request.t | 10 |
1 files changed, 9 insertions, 1 deletions
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} = ( <<EOF +GET /index.html HTTP/1.0 +If-Modified-Since: Sun, 01 Jan 2100 00:00:02 GMT +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)'); + ok($tf->stop_proc == 0, "Stopping lighttpd"); |