summaryrefslogtreecommitdiff
path: root/tests/mod-auth.t
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-06-06 21:21:37 +0000
committerJan Kneschke <jan@kneschke.de>2005-06-06 21:21:37 +0000
commit4d33902639fcf64a7fa46e5fcc942d45df87aa2e (patch)
tree49c2d803e7dfcab143cad1f2c53625cfd9d14917 /tests/mod-auth.t
parentc8652e52b0aa7088a0a7214125949761ef659ec8 (diff)
downloadlighttpd1.4-4d33902639fcf64a7fa46e5fcc942d45df87aa2e.tar.gz
lighttpd1.4-4d33902639fcf64a7fa46e5fcc942d45df87aa2e.zip
merged [373]
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@374 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-auth.t')
-rwxr-xr-xtests/mod-auth.t24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/mod-auth.t b/tests/mod-auth.t
index 3ac6b354..ca0733d5 100755
--- a/tests/mod-auth.t
+++ b/tests/mod-auth.t
@@ -2,7 +2,7 @@
use strict;
use IO::Socket;
-use Test::More tests => 5;
+use Test::More tests => 7;
my $basedir = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'} : '..');
my $srcdir = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');
@@ -211,5 +211,27 @@ EOF
@response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } );
ok(handle_http == 0, 'Basic-Auth: Valid Auth-token');
+@request = ( <<EOF
+GET /server-config HTTP/1.0
+User-Agent: Wget/1.9.1
+Authorization: Digest username="beta", realm="Beta", nonce="9a5428ccc05b086a08d918e73b01fc6f",
+ uri="/server-config", response="ea5f7d9a30b8b762f9610ccb87dea74f"
+EOF
+ );
+@response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } );
+ok(handle_http == 0, 'Digest-Auth: missing qop');
+
+@request = ( <<EOF
+GET /server-config HTTP/1.0
+User-Agent: Wget/1.9.1
+Authorization: Digest username="beta", realm="Beta", nonce="9a5428ccc05b086a08d918e73b01fc6f",
+ uri="/server-config", response="ea5f7d9a30b8b762f9610ccb87dea74e"
+EOF
+ );
+@response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } );
+ok(handle_http == 0, 'Digest-Auth: broken password');
+
+
+
ok(stop_proc == 0, "Stopping lighttpd");