summaryrefslogtreecommitdiff
path: root/tests/mod-auth.t
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2006-02-01 11:35:08 +0000
committerJan Kneschke <jan@kneschke.de>2006-02-01 11:35:08 +0000
commitbd8e6919d29ea6186bcc3c169079d2af44746821 (patch)
tree19cc3df7f91afcfb029bdf6bdc2a5c6c06756ce3 /tests/mod-auth.t
parent433f1883ac8af9f4b077eae9565e285d8f200a5b (diff)
downloadlighttpd1.4-bd8e6919d29ea6186bcc3c169079d2af44746821.tar.gz
lighttpd1.4-bd8e6919d29ea6186bcc3c169079d2af44746821.zip
added tests for possible crashes
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@974 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-auth.t')
-rwxr-xr-xtests/mod-auth.t17
1 files changed, 16 insertions, 1 deletions
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} = ( <<EOF
+GET /server-status HTTP/1.0
+User-Agent: Wget/1.9.1
+Authorization: Digest username="jan", realm="jan",
+ nonce="b1d12348b4620437c43dd61c50ae4639",
+ uri="/MJ-BONG.xm.mpc", qop=auth, noncecount=00000001",
+ cnonce="036FCA5B86F7E7C4965C7F9B8FE714B7",
+ response="29B32C2953C763C6D033C8A49983B87E"
+EOF
+ );
+$t->{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");