Add cookie stuff
[matches/MCTX3420.git] / testing / cookie-test / test.c
diff --git a/testing/cookie-test/test.c b/testing/cookie-test/test.c
new file mode 100644 (file)
index 0000000..7f88239
--- /dev/null
@@ -0,0 +1,10 @@
+#include <fcgi_stdio.h>
+#include <stdlib.h>
+int main() {
+       while (FCGI_Accept() >= 0) {
+               printf("Content-type: text\r\n");
+               printf("Set-Cookie: name=value with spaces; and a semicolon\r\n");
+               printf("Set-Cookie: name2=value2\r\n\r\n");
+               printf("Cookie:%s\n", getenv("COOKIE_STRING"));
+       }
+}

UCC git Repository :: git.ucc.asn.au