summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_curl_defaults.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-11 20:06:15 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-11 20:06:15 +0100
commita25429cadd29177f2bfb56f644696b2cbfbadf72 (patch)
treefbb29428b13a0fba972916d9e01cb6089cb60e48 /src/lib/exchange_api_curl_defaults.c
parent40175318e9a824d01ba9d592b92f244027cc618b (diff)
downloadexchange-a25429cadd29177f2bfb56f644696b2cbfbadf72.tar.gz
exchange-a25429cadd29177f2bfb56f644696b2cbfbadf72.tar.bz2
exchange-a25429cadd29177f2bfb56f644696b2cbfbadf72.zip
fix #7123
Diffstat (limited to 'src/lib/exchange_api_curl_defaults.c')
-rw-r--r--src/lib/exchange_api_curl_defaults.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/exchange_api_curl_defaults.c b/src/lib/exchange_api_curl_defaults.c
index 82d3ace13..6d6016953 100644
--- a/src/lib/exchange_api_curl_defaults.c
+++ b/src/lib/exchange_api_curl_defaults.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2018 Taler Systems SA
+ Copyright (C) 2014-2018, 2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -23,12 +23,6 @@
#include "exchange_api_curl_defaults.h"
-/**
- * Get a curl handle with the right defaults for the exchange lib. In the
- * future, we might manage a pool of connections here.
- *
- * @param url URL to query
- */
CURL *
TALER_EXCHANGE_curl_easy_get_ (const char *url)
{
@@ -45,6 +39,12 @@ TALER_EXCHANGE_curl_easy_get_ (const char *url)
curl_easy_setopt (eh,
CURLOPT_FOLLOWLOCATION,
1L));
+ /* Enable compression (using whatever curl likes), see
+ https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html */
+ GNUNET_break (CURLE_OK ==
+ curl_easy_setopt (eh,
+ CURLOPT_ACCEPT_ENCODING,
+ ""));
/* limit MAXREDIRS to 5 as a simple security measure against
a potential infinite loop caused by a malicious target */
GNUNET_assert (CURLE_OK ==