Changeset 1898
- Timestamp:
- 08/13/2007 11:09:11 AM (14 months ago)
- Location:
- branches/lighttpd-1.4.x/tests
- Files:
-
- 1 added
- 3 modified
-
404-handler.conf (modified) (3 diffs)
-
core-404-handler.t (modified) (3 diffs)
-
docroot/www/404.fcgi (added)
-
docroot/www/404.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.4.x/tests/404-handler.conf
r1894 r1898 1 1 debug.log-request-handling = "enable" 2 debug.log-response-header = "enable" 3 debug.log-request-header = "enable" 2 4 3 5 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" … … 15 17 16 18 server.modules = ( 19 "mod_fastcgi", 17 20 "mod_cgi", 18 21 "mod_accesslog" ) … … 27 30 cgi.assign = (".pl" => "/usr/bin/perl" ) 28 31 32 # fastcgi.server += ( "/404.pl" => 33 # ( "404-handler" => 34 # ( 35 # "socket" => env.SRCDIR + "/tmp/pl-404-fastcgi-1.socket", 36 # "bin-path" => server.document-root + "/404.pl", 37 # "max-procs" => 1, 38 # "check-local" => "disable", 39 # "broken-scriptfilename" => "enable", 40 # ) 41 # ), 42 # ) 43 29 44 $HTTP["url"] =~ "^/static/" { 30 45 server.error-handler-404 = "/404.html" 31 46 } 32 else $HTTP["url"] =~ "^/dynamic/ 200/" {47 else $HTTP["url"] =~ "^/dynamic/" { 33 48 server.error-handler-404 = "/404.pl" 34 49 } 35 else $HTTP["url"] =~ "^/dynamic/302/" {36 server.error-handler-404 = "/404.pl"37 }38 else $HTTP["url"] =~ "^/dynamic/404/" {39 server.error-handler-404 = "/404.pl"40 } -
branches/lighttpd-1.4.x/tests/core-404-handler.t
r1894 r1898 24 24 my $t; 25 25 $tf->{CONFIGFILE} = '404-handler.conf'; 26 26 27 ok($tf->start_proc == 0, "Starting lighttpd") or die(); 27 28 … … 30 31 EOF 31 32 ); 32 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "static not found\n" } ];33 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "static not found\n" } ]; 33 34 ok($tf->handle_http($t) == 0, '404 handler => static'); 34 35 36 # 37 # 38 # 35 39 $t->{REQUEST} = ( <<EOF 36 40 GET /dynamic/200/notfound HTTP/1.0 … … 48 52 49 53 $t->{REQUEST} = ( <<EOF 50 GET /dynamic/ 200/notfound HTTP/1.054 GET /dynamic/404/notfound HTTP/1.0 51 55 EOF 52 56 ); 53 57 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "Not found here\n" } ]; 54 ok($tf->handle_http($t) == 0, '404 handler => dynamic( 200)');58 ok($tf->handle_http($t) == 0, '404 handler => dynamic(404)'); 55 59 56 60 ok($tf->stop_proc == 0, "Stopping lighttpd"); -
branches/lighttpd-1.4.x/tests/docroot/www/404.pl
r1895 r1898 9 9 print ("found here\n"); 10 10 } 11 elsif ($request_uri =~ m|^/dynamic/30 1/| ) {11 elsif ($request_uri =~ m|^/dynamic/302/| ) { 12 12 print header( -status=>302, 13 13 -location => 'http://www.example.org/');

