diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-12-18 16:11:59 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-12-18 20:36:30 -0500 |
commit | c68a7b4552b49052b3876a3e41d772ab051a1d3c (patch) | |
tree | 7d2a6252e1bd0b34bfa24268e293d4cea5d6b85a /tests/fcgi-responder.c | |
parent | 0bff6d58bc2ab5e9a0829f464cf8f6a407c9b4ae (diff) | |
download | lighttpd-git-c68a7b4552b49052b3876a3e41d772ab051a1d3c.tar.gz |
[tests] collect code for "die-at-end" tests
Diffstat (limited to 'tests/fcgi-responder.c')
-rw-r--r-- | tests/fcgi-responder.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/fcgi-responder.c b/tests/fcgi-responder.c index d04bc32e..be626ee2 100644 --- a/tests/fcgi-responder.c +++ b/tests/fcgi-responder.c @@ -11,10 +11,8 @@ #include <string.h> int main (void) { - int num_requests = 1; - while (num_requests > 0 && - FCGI_Accept() >= 0) { + while (FCGI_Accept() >= 0) { char* p; if (NULL != (p = getenv("QUERY_STRING"))) { @@ -32,7 +30,9 @@ int main (void) { printf("\r\n"); } else if (0 == strcmp(p, "die-at-end")) { printf("Status: 200 OK\r\n\r\n"); - num_requests--; + printf("test123"); + FCGI_Finish(); + break; } else { printf("Status: 200 OK\r\n\r\n"); } @@ -50,8 +50,6 @@ int main (void) { } else { printf("test123"); } - - if (0 == num_requests) FCGI_Finish(); } return 0; |