diff options
Diffstat (limited to 'src/peerinfo-tool/plugin_rest_peerinfo.c')
-rw-r--r-- | src/peerinfo-tool/plugin_rest_peerinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/peerinfo-tool/plugin_rest_peerinfo.c b/src/peerinfo-tool/plugin_rest_peerinfo.c index 6e156569a..514b14313 100644 --- a/src/peerinfo-tool/plugin_rest_peerinfo.c +++ b/src/peerinfo-tool/plugin_rest_peerinfo.c | |||
@@ -326,6 +326,7 @@ do_error (void *cls) | |||
326 | handle->response_code = MHD_HTTP_OK; | 326 | handle->response_code = MHD_HTTP_OK; |
327 | response = json_dumps (json_error, 0); | 327 | response = json_dumps (json_error, 0); |
328 | resp = GNUNET_REST_create_response (response); | 328 | resp = GNUNET_REST_create_response (response); |
329 | MHD_add_response_header (resp, "Content-Type", "application/json"); | ||
329 | handle->proc (handle->proc_cls, resp, handle->response_code); | 330 | handle->proc (handle->proc_cls, resp, handle->response_code); |
330 | json_decref (json_error); | 331 | json_decref (json_error); |
331 | GNUNET_free (response); | 332 | GNUNET_free (response); |
@@ -356,6 +357,7 @@ peerinfo_list_finished (void *cls) | |||
356 | result_str = json_dumps (handle->response, 0); | 357 | result_str = json_dumps (handle->response, 0); |
357 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); | 358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); |
358 | resp = GNUNET_REST_create_response (result_str); | 359 | resp = GNUNET_REST_create_response (result_str); |
360 | MHD_add_response_header (resp, "Content-Type", "application/json"); | ||
359 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 361 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
360 | GNUNET_free_non_null (result_str); | 362 | GNUNET_free_non_null (result_str); |
361 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); | 363 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); |