Annotation of embedaddon/lighttpd/tests/docroot/www/404.fcgi, revision 1.1.1.1
1.1 misho 1: #!/usr/bin/perl
2: #use CGI qw/:standard/;
3: use CGI::Fast qw(:standard);
4: my $cgi = new CGI;
5: while (new CGI::Fast) {
6: my $request_uri = $ENV{'REQUEST_URI'};
7: print (STDERR "REQUEST_URI: $request_uri\n");
8: if ($request_uri =~ m/^\/dynamic\/200\// ) {
9: print header ( -status => 200,
10: -type => 'text/plain' );
11: print ("found here\n");
12: }
13: elsif ($request_uri =~ m|^/dynamic/302/| ) {
14: print header( -status=>302,
15: -location => 'http://www.example.org/');
16: }
17: elsif ($request_uri =~ m/^\/dynamic\/404\// ) {
18: print header ( -status => 404
19: -type => 'text/plain' );
20: print ("Not found here\n");
21: }
22: else {
23: print header ( -status => 500,
24: -type => 'text/plain');
25: print ("huh\n");
26: };
27: };
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>