diff --git a/tests/mod-auth.t b/tests/mod-auth.t index f9017b2e..8500ced9 100755 --- a/tests/mod-auth.t +++ b/tests/mod-auth.t @@ -8,7 +8,7 @@ BEGIN { use strict; use IO::Socket; -use Test::More tests => 9; +use Test::More tests => 10; use LightyTest; my $tf = LightyTest->new(); @@ -79,6 +79,21 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; ok($tf->handle_http($t) == 0, 'Digest-Auth: missing qop, no crash'); +## this should not crash +$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'Digest-Auth: missing nc (noncecount instead), no crash'); + + ok($tf->stop_proc == 0, "Stopping lighttpd"); diff --git a/tests/mod-compress.t b/tests/mod-compress.t index 3f1462ab..e4f110f4 100755 --- a/tests/mod-compress.t +++ b/tests/mod-compress.t @@ -8,7 +8,7 @@ BEGIN { use strict; use IO::Socket; -use Test::More tests => 9; +use Test::More tests => 10; use LightyTest; my $tf = LightyTest->new(); @@ -77,4 +77,16 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', '+Content-Encoding' => '', 'Content-Type' => "text/plain" } ]; ok($tf->handle_http($t) == 0, 'Content-Type is from the original file'); +$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Type' => "text/plain" } ]; +ok($tf->handle_http($t) == 0, 'Empty Accept-Encoding'); + + ok($tf->stop_proc == 0, "Stopping lighttpd"); diff --git a/tests/request.t b/tests/request.t index be1f5d8f..e581879e 100755 --- a/tests/request.t +++ b/tests/request.t @@ -8,7 +8,7 @@ BEGIN { use strict; use IO::Socket; -use Test::More tests => 33; +use Test::More tests => 34; use LightyTest; my $tf = LightyTest->new(); @@ -320,6 +320,14 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; ok($tf->handle_http($t) == 0, 'OPTIONS with Content-Length'); +$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'OPTIONS for RTSP'); + $t->{REQUEST} = ( <