gemquote output
[gemrepl.git] / gemscgi_test.c
blob4ef9a086565bf60a2774b8470b2fea454870fecc
1 #include <string.h>
3 #include "gemscgi.h"
5 void respond(void *object, const Request_Info *request_info, int socket)
7 #define put(s) write(socket, s, strlen(s))
8 put("20\r\n");
9 if (request_info->query_string_decoded != NULL) {
10 put(request_info->query_string_decoded);
11 put("\r\n");
13 if (request_info->tls_client_hash != NULL) {
14 put(request_info->tls_client_hash);
15 put("\r\n");
19 int main(int argc, const char **argv)
21 runSCGI("/tmp/gemscgi_testsocket", respond, NULL);