diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 14:40:17 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 14:40:17 +0200 |
commit | 6ab14a20690a499ad32e3f2ad448d64d4e6b65fc (patch) | |
tree | 7866fb31e10cd49b2bb00eaf23134945b506624d /src/reclaim/plugin_rest_reclaim.c | |
parent | 1d4f5263ae72c12a42ec166ec8b1769620baaeda (diff) | |
download | gnunet-6ab14a20690a499ad32e3f2ad448d64d4e6b65fc.tar.gz gnunet-6ab14a20690a499ad32e3f2ad448d64d4e6b65fc.zip |
-fix various bugs
Diffstat (limited to 'src/reclaim/plugin_rest_reclaim.c')
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index eb442bc3b..c2d14825e 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -331,6 +331,7 @@ finished_cont (void *cls, int32_t success, const char *emsg) | |||
331 | 331 | ||
332 | resp = GNUNET_REST_create_response (emsg); | 332 | resp = GNUNET_REST_create_response (emsg); |
333 | MHD_add_response_header (resp, "Content-Type", "application/json"); | 333 | MHD_add_response_header (resp, "Content-Type", "application/json"); |
334 | MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods); | ||
334 | if (GNUNET_OK != success) | 335 | if (GNUNET_OK != success) |
335 | { | 336 | { |
336 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 337 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
@@ -348,6 +349,7 @@ delete_finished_cb (void *cls, int32_t success, const char *emsg) | |||
348 | struct MHD_Response *resp; | 349 | struct MHD_Response *resp; |
349 | 350 | ||
350 | resp = GNUNET_REST_create_response (emsg); | 351 | resp = GNUNET_REST_create_response (emsg); |
352 | MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods); | ||
351 | if (GNUNET_OK != success) | 353 | if (GNUNET_OK != success) |
352 | { | 354 | { |
353 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 355 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
@@ -373,6 +375,7 @@ return_response (void *cls) | |||
373 | result_str = json_dumps (handle->resp_object, 0); | 375 | result_str = json_dumps (handle->resp_object, 0); |
374 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); | 376 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); |
375 | resp = GNUNET_REST_create_response (result_str); | 377 | resp = GNUNET_REST_create_response (result_str); |
378 | MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods); | ||
376 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 379 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
377 | GNUNET_free (result_str); | 380 | GNUNET_free (result_str); |
378 | cleanup_handle (handle); | 381 | cleanup_handle (handle); |