summaryrefslogtreecommitdiff
path: root/src/lib/teah_common.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-05-16 16:58:09 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2019-05-16 16:58:09 +0200
commit95933156a6d477460a20225209f556208702d55e (patch)
treee9f940ba5adfe136f1e27aa77ddc1860ff526cfd /src/lib/teah_common.c
parent8d34b22aff354f02bbd161a4e51fc8b878e32ff9 (diff)
downloadexchange-95933156a6d477460a20225209f556208702d55e.tar.gz
exchange-95933156a6d477460a20225209f556208702d55e.tar.bz2
exchange-95933156a6d477460a20225209f556208702d55e.zip
Fix compression.
The "Content-Encoding: deflate" header is now added from within the compression routine itself, and _not_ from the "exchange handle". This fixed the bank-lib functions as those do not use any exchange handle, and therefore were wrongly sending compressed bodies without adding the mentioned HTTP header.
Diffstat (limited to 'src/lib/teah_common.c')
-rw-r--r--src/lib/teah_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/teah_common.c b/src/lib/teah_common.c
index 8f994ef3..1cbe9df7 100644
--- a/src/lib/teah_common.c
+++ b/src/lib/teah_common.c
@@ -78,6 +78,10 @@ TEAH_curl_easy_post (struct TEAH_PostContext *ctx,
slen = (size_t) cbuf_size;
ctx->json_enc = (char *) cbuf;
}
+ GNUNET_assert
+ (NULL != (ctx->headers = curl_slist_append
+ (ctx->headers,
+ "Content-Encoding: deflate")));
#else
ctx->json_enc = str;
#endif