From 62a4cae3bcbefbec057275b2513a947bfc149ac6 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Fri, 18 Sep 2009 18:44:57 +0200 Subject: [PATCH] Must copy the data when creating a response --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 7a850c8..87a1f66 100644 --- a/src/main.c +++ b/src/main.c @@ -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); -- 2.39.5