diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/exchange_api_handle.c | 6 | ||||
| -rw-r--r-- | src/lib/teah_common.c | 4 | ||||
| -rw-r--r-- | src/lib/teah_common.h | 6 | 
3 files changed, 9 insertions, 7 deletions
| diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 760c1278..fbff68d1 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -1784,12 +1784,6 @@ 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); 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 diff --git a/src/lib/teah_common.h b/src/lib/teah_common.h index 66937a26..c7231185 100644 --- a/src/lib/teah_common.h +++ b/src/lib/teah_common.h @@ -30,7 +30,7 @@  /**   * Should we compress PUT/POST bodies with 'deflate' encoding?   */ -#define COMPRESS_BODIES 0 +#define COMPRESS_BODIES 1  /**   * State used for #TEAL_curl_easy_post() and @@ -43,6 +43,10 @@ struct TEAH_PostContext     */    char *json_enc; +  /** +   * Custom headers. +   */ +  struct curl_slist *headers;  }; | 
