diff options
author | Jan Kneschke <jan@kneschke.de> | 2005-03-01 13:37:40 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2005-03-01 13:37:40 +0000 |
commit | 2420fd96d25bf938ef6985152f1754e3c75a9f71 (patch) | |
tree | 52611c0e42423b7e04dfd17f39ab9336707a099f /tests/fcgi-responder.c | |
parent | bad98d1bba12e9919e5dda5c3f4ad855e942423b (diff) | |
download | lighttpd-git-2420fd96d25bf938ef6985152f1754e3c75a9f71.tar.gz |
added checks for the line-terminator handling and cleanup the configs
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@62 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/fcgi-responder.c')
-rw-r--r-- | tests/fcgi-responder.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/fcgi-responder.c b/tests/fcgi-responder.c new file mode 100644 index 00000000..8237f7c2 --- /dev/null +++ b/tests/fcgi-responder.c @@ -0,0 +1,34 @@ +#include <fcgi_stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +int main () { + char* p; + + while (FCGI_Accept() >= 0) { + if (NULL != (p = getenv("QUERY_STRING"))) { + if (0 == strcmp(p, "lf")) { + printf("Status: 200 OK\n\n"); + } else if (0 == strcmp(p, "crlf")) { + printf("Status: 200 OK\r\n\r\n"); + } else if (0 == strcmp(p, "slow-lf")) { + printf("Status: 200 OK\n"); + fflush(stdout); + printf("\n"); + } else if (0 == strcmp(p,"slow-crlf")) { + printf("Status: 200 OK\r\n"); + fflush(stdout); + printf("\r\n"); + } else { + printf("Status: 200 OK\r\n\r\n"); + } + } else { + printf("Status: 500 Internal Foo\r\n\r\n"); + } + + printf("test123"); + } + + return 0; +} |