summaryrefslogtreecommitdiff
path: root/tests/docroot
diff options
context:
space:
mode:
Diffstat (limited to 'tests/docroot')
-rw-r--r--tests/docroot/www/404.html1
-rw-r--r--tests/docroot/www/404.pl24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/docroot/www/404.html b/tests/docroot/www/404.html
new file mode 100644
index 00000000..ce72e899
--- /dev/null
+++ b/tests/docroot/www/404.html
@@ -0,0 +1 @@
+static not found
diff --git a/tests/docroot/www/404.pl b/tests/docroot/www/404.pl
new file mode 100644
index 00000000..4260e32e
--- /dev/null
+++ b/tests/docroot/www/404.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+use CGI qw/:standard/;
+my $cgi = new CGI;
+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/301/| ) {
+ 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 => 404,
+ -type => 'text/plain');
+ print ("huh\n");
+};