diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-08-18 14:02:54 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-08-18 14:02:54 +0200 |
commit | 246d49b37923689c4e347f403f6bb3c9c24b45be (patch) | |
tree | 5df8c3e01395ca1fac2511d17bd1e0035dbdeb2d /src/curl/curl.c | |
parent | 14a240f7cc7213959ae11a020b37a6c10837bc4a (diff) |
-work on kyc-proof persona plugin
Diffstat (limited to 'src/curl/curl.c')
-rw-r--r-- | src/curl/curl.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/curl/curl.c b/src/curl/curl.c index 5009fa3cf..caa0052f7 100644 --- a/src/curl/curl.c +++ b/src/curl/curl.c @@ -46,7 +46,8 @@ TALER_curl_easy_post (struct TALER_CURL_PostContext *ctx, return GNUNET_SYSERR; } slen = strlen (str); -#if TALER_CURL_COMPRESS_BODIES + if (TALER_CURL_COMPRESS_BODIES && + (! ctx->disable_compression) ) { Bytef *cbuf; uLongf cbuf_size; @@ -68,18 +69,21 @@ TALER_curl_easy_post (struct TALER_CURL_PostContext *ctx, free (str); slen = (size_t) cbuf_size; ctx->json_enc = (char *) cbuf; + GNUNET_assert ( + NULL != + (ctx->headers = curl_slist_append ( + ctx->headers, + "Content-Encoding: deflate"))); } - GNUNET_assert (NULL != (ctx->headers = curl_slist_append ( - ctx->headers, - "Content-Encoding: deflate"))); -#else - ctx->json_enc = str; -#endif - - GNUNET_assert - (NULL != (ctx->headers = curl_slist_append ( - ctx->headers, - "Content-Type: application/json"))); + else + { + ctx->json_enc = str; + } + GNUNET_assert ( + NULL != + (ctx->headers = curl_slist_append ( + ctx->headers, + "Content-Type: application/json"))); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, |