gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-twister] branch master updated (0095cd3 -> 7d8f5aa)


From: gnunet
Subject: [GNUnet-SVN] [taler-twister] branch master updated (0095cd3 -> 7d8f5aa)
Date: Fri, 07 Jun 2019 13:01:26 +0200

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

marcello pushed a change to branch master
in repository twister.

    from 0095cd3  testing IPC
     new 69740ff  symbol for apikey-sandbox
     new 7d8f5aa  --enable-apikey-sandbox.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                        |  7 +++++++
 src/twister/taler-twister-service.c | 12 ++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/configure.ac b/configure.ac
index 74d9efc..d609540 100644
--- a/configure.ac
+++ b/configure.ac
@@ -424,6 +424,13 @@ AC_ARG_ENABLE([[doc]],
 test "x$enable_doc" = "xno" || enable_doc=yes
 AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
 
+# Check if --enable-apikey-sandbox was given.
+
+AC_MSG_CHECKING([whether all requests will have a apikey sandbox header])
+AC_ARG_ENABLE([apikey_sandbox],
+  [AS_HELP_STRING([--enable-apikey-sandbox], [Adds a "Autorization: ApiKey 
sandbox" header to requests])],
+  [AC_DEFINE(APIKEY_SANDBOX, , [Adds a "Autorization: ApiKey sandbox" header 
to requests])],
+  [])
 
 else
 
diff --git a/src/twister/taler-twister-service.c 
b/src/twister/taler-twister-service.c
index 1d2143f..c1a445f 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -1575,9 +1575,12 @@ create_response (void *cls,
     curl_easy_setopt (hr->curl,
                       CURLOPT_INFILESIZE,
                      hr->io_len);
+
+    /* This works _response_ headers out.  */
     curl_easy_setopt (hr->curl,
                       CURLOPT_HEADERFUNCTION,
                       &curl_check_hdr);
+
     curl_easy_setopt (hr->curl,
                      CURLOPT_HEADERDATA,
                      hr);
@@ -1724,10 +1727,19 @@ create_response (void *cls,
       return MHD_NO;
     }
 
+    /**
+     * This works _request_ headers out.
+     */
     MHD_get_connection_values (con,
                                MHD_HEADER_KIND,
                                &con_val_iter,
                                hr);
+    #ifdef APIKEY_SANDBOX
+    GNUNET_assert
+      (NULL !=  curl_slist_append
+        (hr->headers,
+         "Authorization: ApiKey sandbox");
+    #endif
 
     curl_easy_setopt (hr->curl,
                       CURLOPT_HTTPHEADER,

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



reply via email to

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