gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] branch master updated: fix missing auth he


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: fix missing auth header for /admin/add/incoming
Date: Tue, 09 May 2017 22:25:55 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 1edf34e  fix missing auth header for /admin/add/incoming
1edf34e is described below

commit 1edf34e52ae3d3efffbc496c007d44264195bb8b
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue May 9 22:25:53 2017 +0200

    fix missing auth header for /admin/add/incoming
---
 src/bank-lib/bank_api_admin.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c
index af23c57..a243202 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;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]