aboutsummaryrefslogtreecommitdiff
path: root/src/gns/plugin_rest_gns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/plugin_rest_gns.c')
-rw-r--r--src/gns/plugin_rest_gns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c
index 81c2c974b..feb333350 100644
--- a/src/gns/plugin_rest_gns.c
+++ b/src/gns/plugin_rest_gns.c
@@ -200,6 +200,7 @@ do_error (void *cls)
200 handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; 200 handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
201 response = json_dumps (json_error, 0); 201 response = json_dumps (json_error, 0);
202 resp = GNUNET_REST_create_response (response); 202 resp = GNUNET_REST_create_response (response);
203 MHD_add_response_header (resp, "Content-Type", "application/json");
203 handle->proc (handle->proc_cls, resp, handle->response_code); 204 handle->proc (handle->proc_cls, resp, handle->response_code);
204 json_decref (json_error); 205 json_decref (json_error);
205 GNUNET_free (response); 206 GNUNET_free (response);
@@ -252,6 +253,7 @@ handle_gns_response (void *cls,
252 result = json_dumps (result_obj, 0); 253 result = json_dumps (result_obj, 0);
253 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result); 254 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result);
254 resp = GNUNET_REST_create_response (result); 255 resp = GNUNET_REST_create_response (result);
256 MHD_add_response_header (resp, "Content-Type", "application/json");
255 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 257 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
256 GNUNET_free (result); 258 GNUNET_free (result);
257 json_decref (result_obj); 259 json_decref (result_obj);