summaryrefslogtreecommitdiff
path: root/tests/docroot
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/docroot
parent984f5caf57d140f20a6c85b885be5ad7d48efaa6 (diff)
downloadlighttpd-git-029d32039cdb0f52bcf5be83efef17ecdaf26666.tar.gz
- 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/docroot')
-rwxr-xr-xtests/docroot/www/404.fcgi27
-rwxr-xr-xtests/docroot/www/404.pl2
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/docroot/www/404.fcgi b/tests/docroot/www/404.fcgi
new file mode 100755
index 00000000..468089f8
--- /dev/null
+++ b/tests/docroot/www/404.fcgi
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+#use CGI qw/:standard/;
+use CGI::Fast qw(:standard);
+my $cgi = new CGI;
+while (new CGI::Fast) {
+ my $request_uri = $ENV{'REQUEST_URI'};
+ print (STDERR "REQUEST_URI: $request_uri\n");
+ if ($request_uri =~ m/^\/dynamic\/200\// ) {
+ print header ( -status => 200,
+ -type => 'text/plain' );
+ print ("found here\n");
+ }
+ elsif ($request_uri =~ m|^/dynamic/302/| ) {
+ print header( -status=>302,
+ -location => 'http://www.example.org/');
+ }
+ elsif ($request_uri =~ m/^\/dynamic\/404\// ) {
+ print header ( -status => 404
+ -type => 'text/plain' );
+ print ("Not found here\n");
+ }
+ else {
+ print header ( -status => 500,
+ -type => 'text/plain');
+ print ("huh\n");
+ };
+};
diff --git a/tests/docroot/www/404.pl b/tests/docroot/www/404.pl
index 4260e32e..7c6d29bc 100755
--- a/tests/docroot/www/404.pl
+++ b/tests/docroot/www/404.pl
@@ -8,7 +8,7 @@ if ($request_uri =~ m/^\/dynamic\/200\// ) {
-type => 'text/plain' );
print ("found here\n");
}
-elsif ($request_uri =~ m|^/dynamic/301/| ) {
+elsif ($request_uri =~ m|^/dynamic/302/| ) {
print header( -status=>302,
-location => 'http://www.example.org/');
}