summaryrefslogtreecommitdiff
path: root/tests/fcgi-responder.c
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-03-01 16:57:24 +0000
committerJan Kneschke <jan@kneschke.de>2005-03-01 16:57:24 +0000
commit5ca4dff14d4a08c8a4396fba2e0d371f1bdf5a0c (patch)
tree8ab5a3f4e6e4e6b7a615a737efde7aac6496bac2 /tests/fcgi-responder.c
parent7725e92ff60442ba5f37fd70ae0cb878a08e6aea (diff)
downloadlighttpd1.4-5ca4dff14d4a08c8a4396fba2e0d371f1bdf5a0c.tar.gz
lighttpd1.4-5ca4dff14d4a08c8a4396fba2e0d371f1bdf5a0c.zip
added tests for restarting fcgi-procs after they died
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@64 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/fcgi-responder.c')
-rw-r--r--tests/fcgi-responder.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/fcgi-responder.c b/tests/fcgi-responder.c
index 8237f7c2..7fbaf28c 100644
--- a/tests/fcgi-responder.c
+++ b/tests/fcgi-responder.c
@@ -4,9 +4,12 @@
#include <string.h>
int main () {
- char* p;
+ int num_requests = 2;
- while (FCGI_Accept() >= 0) {
+ while (num_requests > 0 &&
+ FCGI_Accept() >= 0) {
+ char* p;
+
if (NULL != (p = getenv("QUERY_STRING"))) {
if (0 == strcmp(p, "lf")) {
printf("Status: 200 OK\n\n");
@@ -20,6 +23,9 @@ int main () {
printf("Status: 200 OK\r\n");
fflush(stdout);
printf("\r\n");
+ } else if (0 == strcmp(p, "die-at-end")) {
+ printf("Status: 200 OK\r\n\r\n");
+ num_requests--;
} else {
printf("Status: 200 OK\r\n\r\n");
}
@@ -27,8 +33,8 @@ int main () {
printf("Status: 500 Internal Foo\r\n\r\n");
}
- printf("test123");
+ printf("test123");
}
-
+
return 0;
}