From a16c32a4745634b77439200ee4831fed2811fd8a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 3 May 2019 17:36:58 +0200 Subject: add compression support for bodies of POST/PUT operations --- src/lib/exchange_api_handle.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib/exchange_api_handle.c') diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 93fe798c3..0f3cfe0ae 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -33,6 +33,7 @@ #include "exchange_api_handle.h" #include "exchange_api_curl_defaults.h" #include "backoff.h" +#include "teah_common.h" /** * Which revision of the Taler protocol is implemented @@ -1783,6 +1784,12 @@ TALER_EXCHANGE_connect GNUNET_break (GNUNET_OK == GNUNET_CURL_append_header (ctx, "Expect:")); +#if COMPRESS_BODIES + /* Tell exchange we compress bodies */ + GNUNET_break (GNUNET_OK == + GNUNET_CURL_append_header (ctx, + "Content-encoding: deflate")); +#endif exchange = GNUNET_new (struct TALER_EXCHANGE_Handle); exchange->ctx = ctx; exchange->url = GNUNET_strdup (url); @@ -1816,6 +1823,7 @@ TALER_EXCHANGE_connect } + /** * Initiate download of /keys from the exchange. * -- cgit v1.2.3