summaryrefslogtreecommitdiff
path: root/tests/core-404-handler.t
diff options
context:
space:
mode:
authorMarcus Rückert <darix@opensu.se>2007-08-13 11:09:11 +0000
committerMarcus Rückert <darix@opensu.se>2007-08-13 11:09:11 +0000
commit029d32039cdb0f52bcf5be83efef17ecdaf26666 (patch)
tree6b833862474ba34cfed21a2a695c7c63680edf7f /tests/core-404-handler.t
parent984f5caf57d140f20a6c85b885be5ad7d48efaa6 (diff)
downloadlighttpd1.4-029d32039cdb0f52bcf5be83efef17ecdaf26666.tar.gz
lighttpd1.4-029d32039cdb0f52bcf5be83efef17ecdaf26666.zip
- fixed 404 testsuite
- added optional fastcgi handler git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1898 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/core-404-handler.t')
-rw-r--r--tests/core-404-handler.t10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/core-404-handler.t b/tests/core-404-handler.t
index 002e6fb8..91b11e2b 100644
--- a/tests/core-404-handler.t
+++ b/tests/core-404-handler.t
@@ -23,15 +23,19 @@ use LightyTest;
my $tf = LightyTest->new();
my $t;
$tf->{CONFIGFILE} = '404-handler.conf';
+
ok($tf->start_proc == 0, "Starting lighttpd") or die();
$t->{REQUEST} = ( <<EOF
GET /static/notfound HTTP/1.0
EOF
);
-$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "static not found\n" } ];
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "static not found\n" } ];
ok($tf->handle_http($t) == 0, '404 handler => static');
+#
+#
+#
$t->{REQUEST} = ( <<EOF
GET /dynamic/200/notfound HTTP/1.0
EOF
@@ -47,11 +51,11 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 302, 'Locat
ok($tf->handle_http($t) == 0, '404 handler => dynamic(302)');
$t->{REQUEST} = ( <<EOF
-GET /dynamic/200/notfound HTTP/1.0
+GET /dynamic/404/notfound HTTP/1.0
EOF
);
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "Not found here\n" } ];
-ok($tf->handle_http($t) == 0, '404 handler => dynamic(200)');
+ok($tf->handle_http($t) == 0, '404 handler => dynamic(404)');
ok($tf->stop_proc == 0, "Stopping lighttpd");