add !plain
[gemrepl.git] / gemscgi_example.c
blobc1e66e5af9b32102d336b91ae2adc85e09e9690e
1 #include <string.h>
2 #include <unistd.h>
4 #include "gemscgi.h"
6 void respond(void *object, const Request_Info *request_info, int socket)
8 #define put(s) write(socket, s, strlen(s))
9 put("20\r\n");
10 if (request_info->query_string_decoded != NULL) {
11 put(request_info->query_string_decoded);
12 put("\r\n");
14 if (request_info->tls_client_hash != NULL) {
15 put(request_info->tls_client_hash);
16 put("\r\n");
20 int main(int argc, const char **argv)
22 runSCGI("/tmp/gemscgi_testsocket", respond, NULL);