diff options
author | Jan Kneschke <jan@kneschke.de> | 2007-09-06 11:24:20 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2007-09-06 11:24:20 +0000 |
commit | 5b2e697cfa71c9a13c73edd0e2590c48aca4d3c0 (patch) | |
tree | ef584e60fe0e073b20083d696e48ce5e619bfe3a /tests | |
parent | eaed2f1e501bfa04710bcb823d749220fdd3e720 (diff) | |
download | lighttpd-git-5b2e697cfa71c9a13c73edd0e2590c48aca4d3c0.tar.gz |
* fixed hanging redirects with keep-alive due to missing
"Content-Length: 0" headers
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1985 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/mod-redirect.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/mod-redirect.t b/tests/mod-redirect.t index b26abc92..076a4b3d 100755 --- a/tests/mod-redirect.t +++ b/tests/mod-redirect.t @@ -8,7 +8,7 @@ BEGIN { use strict; use IO::Socket; -use Test::More tests => 6; +use Test::More tests => 7; use LightyTest; my $tf = LightyTest->new(); @@ -24,6 +24,14 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://localhost:'.$tf->{PORT}.'/' } ]; ok($tf->handle_http($t) == 0, 'external redirect'); +$t->{REQUEST} = ( <<EOF +GET /redirect/ HTTP/1.0 +Host: vvv.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://localhost:'.$tf->{PORT}.'/', 'Content-Length' => '0' } ]; +ok($tf->handle_http($t) == 0, 'external redirect should have a Content-Length: 0'); + $t->{REQUEST} = ( <<EOF GET /redirect/ HTTP/1.0 Host: zzz.example.org |