[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libebics] branch master updated: Actually put content-type
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libebics] branch master updated: Actually put content-type XML header. |
Date: |
Mon, 22 Oct 2018 18:04:12 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libebics.
The following commit(s) were added to refs/heads/master by this push:
new 035cfdb Actually put content-type XML header.
035cfdb is described below
commit 035cfdb1cdba5724af01ac47f657bf28a7912bb9
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Oct 22 18:03:40 2018 +0200
Actually put content-type XML header.
---
src/libebics.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/libebics.c b/src/libebics.c
index 64a3077..4a3d2ab 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -50,6 +50,12 @@ static struct GNUNET_CURL_Context *ctx;
*/
static struct GNUNET_CURL_Job *job = NULL;
+
+/**
+ * Specify "Content-Type: text/xml" HTTP header.
+ */
+static struct curl_slist *custom_headers;
+
/**
* Reschedule context for GNUnet CURL
*/
@@ -776,6 +782,11 @@ EBICS_init_library (const char *key_dir,
&parse_response,
&clean_response);
+ GNUNET_assert
+ (NULL != (custom_headers = curl_slist_append
+ (NULL,
+ "Content-Type: text/xml")));
+
GNUNET_assert (NULL != reschedule_ctx);
GNUNET_assert (NULL != ctx);
@@ -814,6 +825,7 @@ EBICS_close_library ()
free_genex_documents (genexList);
free_keymaterial (keyList);
+ curl_slist_free_all (custom_headers);
if (NULL != reschedule_ctx)
GNUNET_CURL_gnunet_rc_destroy (reschedule_ctx);
@@ -1080,11 +1092,6 @@ EBICS_send_message (const struct EBICS_genex_document
*document,
GNUNET_NO);
eh = curl_easy_init ();
- GNUNET_assert
- (GNUNET_OK == GNUNET_CURL_append_header
- (ctx,
- "Content-Type: text/xml"));
-
SETOPT (eh,
CURLOPT_URL,
url);
@@ -1097,6 +1104,10 @@ EBICS_send_message (const struct EBICS_genex_document
*document,
CURLOPT_COPYPOSTFIELDS,
buf);
+ SETOPT (eh,
+ CURLOPT_HTTPHEADER,
+ custom_headers);
+
xmlFree (buf);
if (NULL == (job = GNUNET_CURL_job_add (ctx,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libebics] branch master updated: Actually put content-type XML header.,
gnunet <=