summaryrefslogtreecommitdiff
path: root/tests/docroot/www/404.fcgi
diff options
context:
space:
mode:
Diffstat (limited to 'tests/docroot/www/404.fcgi')
-rwxr-xr-xtests/docroot/www/404.fcgi27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/docroot/www/404.fcgi b/tests/docroot/www/404.fcgi
new file mode 100755
index 0000000..468089f
--- /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");
+ };
+};