diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-05-09 22:25:53 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-05-09 22:25:53 +0200 |
commit | 1edf34e52ae3d3efffbc496c007d44264195bb8b (patch) | |
tree | ca42783ff3879e1b9bf20320c2ba5e0b475e18d8 /src | |
parent | e6d09d25681798a01cc6a61877a0ec4a0f2dca63 (diff) | |
download | exchange-1edf34e52ae3d3efffbc496c007d44264195bb8b.tar.xz |
fix missing auth header for /admin/add/incoming
Diffstat (limited to 'src')
-rw-r--r-- | src/bank-lib/bank_api_admin.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index af23c5791..a24320236 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -199,6 +199,18 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx, aai->request_url = TALER_BANK_path_to_url_ (bank_base_url, "/admin/add/incoming"); aai->authh = TALER_BANK_make_auth_header_ (auth); + /* Append content type header here, can't do it in GNUNET_CURL_job_add + as that would override the CURLOPT_HTTPHEADER instead of appending. */ + { + struct curl_slist *ext; + + ext = curl_slist_append (aai->authh, + "Content-Type: application/json"); + if (NULL == ext) + GNUNET_break (0); + else + aai->authh = ext; + } eh = curl_easy_init (); GNUNET_assert (NULL != (aai->json_enc = json_dumps (admin_obj, @@ -222,7 +234,7 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx, strlen (aai->json_enc))); aai->job = GNUNET_CURL_job_add (ctx, eh, - GNUNET_YES, + GNUNET_NO, &handle_admin_add_incoming_finished, aai); return aai; |