Changeset 64
- Timestamp:
- 03/01/2005 04:57:24 PM (4 years ago)
- Location:
- trunk/tests
- Files:
-
- 3 modified
-
fastcgi-responder.conf (modified) (2 diffs)
-
fcgi-responder.c (modified) (3 diffs)
-
run-tests.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/fastcgi-responder.conf
r62 r64 2 2 server.pid-file = "/tmp/lighttpd/lighttpd.pid" 3 3 4 debug.log-request-header = "enable" 5 debug.log-response-header = "enable" 6 debug.log-request-handling = "enable" 4 #debug.log-request-header = "enable" 5 #debug.log-response-header = "enable" 6 #debug.log-request-handling = "enable" 7 #debug.log-state-handling = "enable" 8 9 #fastcgi.debug = 1 7 10 8 11 ## bind to port (default: 80) … … 89 92 "port" => 1028, 90 93 "bin-path" => "./fcgi-responder", 91 "check-local" => "disable" 94 "check-local" => "disable", 95 "max-procs" => 1, 96 "min-procs" => 1 92 97 ) 93 98 ) -
trunk/tests/fcgi-responder.c
r62 r64 5 5 6 6 int main () { 7 char* p;7 int num_requests = 2; 8 8 9 while (FCGI_Accept() >= 0) { 9 while (num_requests > 0 && 10 FCGI_Accept() >= 0) { 11 char* p; 12 10 13 if (NULL != (p = getenv("QUERY_STRING"))) { 11 14 if (0 == strcmp(p, "lf")) { … … 21 24 fflush(stdout); 22 25 printf("\r\n"); 26 } else if (0 == strcmp(p, "die-at-end")) { 27 printf("Status: 200 OK\r\n\r\n"); 28 num_requests--; 23 29 } else { 24 30 printf("Status: 200 OK\r\n\r\n"); … … 28 34 } 29 35 30 printf("test123"); 36 printf("test123"); 31 37 } 32 38 33 39 return 0; 34 40 } -
trunk/tests/run-tests.pl
r62 r64 3 3 use strict; 4 4 use IO::Socket; 5 use Test::More tests => 12 4;5 use Test::More tests => 126; 6 6 7 7 … … 1221 1221 ok(handle_http == 0, 'line-ending \n + \n'); 1222 1222 1223 1224 1225 1223 @request = ( <<EOF 1226 1224 GET /index.fcgi?slow-crlf HTTP/1.0 … … 1231 1229 ok(handle_http == 0, 'line-ending \r\n + \r\n'); 1232 1230 1231 @request = ( <<EOF 1232 GET /index.fcgi?die-at-end HTTP/1.0 1233 Host: www.example.org 1234 EOF 1235 ); 1236 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ); 1237 ok(handle_http == 0, 'killing fastcgi and wait for restart'); 1238 1239 @request = ( <<EOF 1240 GET /index.fcgi?crlf HTTP/1.0 1241 Host: www.example.org 1242 EOF 1243 ); 1244 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ); 1245 ok(handle_http == 0, 'regular response of after restart'); 1246 1247 1233 1248 1234 1249 ok(stop_proc == 0, "Stopping lighttpd");

