]> err.no Git - yubikey-server-c/commitdiff
Must copy the data when creating a response
authorTollef Fog Heen <tfheen@err.no>
Fri, 18 Sep 2009 16:44:57 +0000 (18:44 +0200)
committerTollef Fog Heen <tfheen@err.no>
Fri, 18 Sep 2009 16:44:57 +0000 (18:44 +0200)
src/main.c

index 7a850c823f2fc73876757dc3942d12a7d87d6975..87a1f66826f7883cd19ad299bce34fddf1d3c374 100644 (file)
@@ -67,7 +67,7 @@ static int handle_request(void *data,
                
                fullname = PQgetvalue(res, i, 0);
                response = MHD_create_response_from_data(strlen(fullname), (void*)fullname,
-                                                        MHD_NO, MHD_NO);
+                                                        MHD_YES, MHD_YES);
                r = MHD_queue_response(conn, MHD_HTTP_OK, response);
                MHD_destroy_response(response);
                fprintf(stderr, "%s %s\n", method, url);