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