summaryrefslogtreecommitdiff
path: root/src/bank-lib/bank_api_admin.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-09 22:25:53 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-09 22:25:53 +0200
commit1edf34e52ae3d3efffbc496c007d44264195bb8b (patch)
treeca42783ff3879e1b9bf20320c2ba5e0b475e18d8 /src/bank-lib/bank_api_admin.c
parente6d09d25681798a01cc6a61877a0ec4a0f2dca63 (diff)
downloadexchange-1edf34e52ae3d3efffbc496c007d44264195bb8b.tar.gz
exchange-1edf34e52ae3d3efffbc496c007d44264195bb8b.tar.bz2
exchange-1edf34e52ae3d3efffbc496c007d44264195bb8b.zip
fix missing auth header for /admin/add/incoming
Diffstat (limited to 'src/bank-lib/bank_api_admin.c')
-rw-r--r--src/bank-lib/bank_api_admin.c14
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 af23c579..a2432023 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;