summaryrefslogtreecommitdiff
path: root/src/identity/plugin_rest_identity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity/plugin_rest_identity.c')
-rw-r--r--src/identity/plugin_rest_identity.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index 4b3571996..97a7bf513 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -309,6 +309,7 @@ do_error (void *cls)
handle->response_code = MHD_HTTP_OK;
response = json_dumps (json_error, 0);
resp = GNUNET_REST_create_response (response);
+ MHD_add_response_header (resp, "Content-Type", "application/json");
handle->proc (handle->proc_cls, resp, handle->response_code);
json_decref (json_error);
GNUNET_free (response);
@@ -398,7 +399,7 @@ ego_get_for_subsystem (void *cls,
result_str = json_dumps (json_root, 0);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
resp = GNUNET_REST_create_response (result_str);
-
+ MHD_add_response_header (resp, "Content-Type", "application/json");
json_decref (json_root);
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
GNUNET_free (result_str);
@@ -485,7 +486,7 @@ ego_get_all (struct GNUNET_REST_RequestHandle *con_handle,
result_str = json_dumps (json_root, 0);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
resp = GNUNET_REST_create_response (result_str);
-
+ MHD_add_response_header (resp, "Content-Type", "application/json");
json_decref (json_root);
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
GNUNET_free (result_str);
@@ -518,7 +519,7 @@ ego_get_response (struct RequestHandle *handle, struct EgoEntry *ego_entry)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
resp = GNUNET_REST_create_response (result_str);
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
-
+ MHD_add_response_header (resp, "Content-Type", "application/json");
json_decref (json_ego);
GNUNET_free (result_str);
GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);