diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-13 17:37:07 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-13 17:37:07 +0000 |
commit | 14f993de57d834b4743d22cd952cfd7ca3aef097 (patch) | |
tree | dd3516cfeab8d94e9812594846aecd0565455c82 /src/rest | |
parent | 7ae2282ee296b24e0132d155ece49ae87e21215b (diff) | |
download | gnunet-14f993de57d834b4743d22cd952cfd7ca3aef097.tar.gz gnunet-14f993de57d834b4743d22cd952cfd7ca3aef097.zip |
-fix, debug
Diffstat (limited to 'src/rest')
-rw-r--r-- | src/rest/gnunet-rest-server.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 1a6ab73b0..10577b451 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c | |||
@@ -333,16 +333,12 @@ create_response (void *cls, | |||
333 | 333 | ||
334 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 334 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
335 | "Queueing response from plugin with MHD\n"); | 335 | "Queueing response from plugin with MHD\n"); |
336 | if (GNUNET_OK == con_handle->status) { | 336 | MHD_add_response_header (con_handle->response,"Access-Control-Allow-Origin","*"); |
337 | return MHD_queue_response (con, | 337 | int ret = MHD_queue_response (con, |
338 | MHD_HTTP_OK, | 338 | con_handle->status, |
339 | con_handle->response); | 339 | con_handle->response); |
340 | } else { | ||
341 | return MHD_queue_response (con, | ||
342 | MHD_HTTP_BAD_REQUEST, | ||
343 | con_handle->response); | ||
344 | } | ||
345 | cleanup_handle (con_handle); | 340 | cleanup_handle (con_handle); |
341 | return ret; | ||
346 | } | 342 | } |
347 | return MHD_YES; | 343 | return MHD_YES; |
348 | } | 344 | } |