mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
fix: when setting Accept-Encoding to identity, disable curl decoding. (#4609)
Also, change `CURLOPT_ENCODING` usage to `CURLOPT_ACCEPT_ENCODING`. This key was renamed upstream in 7.21.6; our CURL_MINIMUM is 7.28.0. Fixes #753.
This commit is contained in:
parent
75876e92e0
commit
3bc1a1be04
1 changed files with 3 additions and 2 deletions
|
@ -506,7 +506,7 @@ public:
|
|||
(void)curl_easy_setopt(e, CURLOPT_SHARE, shared());
|
||||
(void)curl_easy_setopt(e, CURLOPT_DNS_CACHE_TIMEOUT, DnsCacheTimeoutSecs);
|
||||
(void)curl_easy_setopt(e, CURLOPT_AUTOREFERER, 1L);
|
||||
(void)curl_easy_setopt(e, CURLOPT_ENCODING, "");
|
||||
(void)curl_easy_setopt(e, CURLOPT_ACCEPT_ENCODING, "");
|
||||
(void)curl_easy_setopt(e, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
(void)curl_easy_setopt(e, CURLOPT_MAXREDIRS, -1L);
|
||||
(void)curl_easy_setopt(e, CURLOPT_NOSIGNAL, 1L);
|
||||
|
@ -576,7 +576,8 @@ public:
|
|||
if (auto const& range = task.range(); range)
|
||||
{
|
||||
/* don't bother asking the server to compress webseed fragments */
|
||||
(void)curl_easy_setopt(e, CURLOPT_ENCODING, "identity");
|
||||
(void)curl_easy_setopt(e, CURLOPT_ACCEPT_ENCODING, "identity");
|
||||
(void)curl_easy_setopt(e, CURLOPT_HTTP_CONTENT_DECODING, 0L);
|
||||
(void)curl_easy_setopt(e, CURLOPT_RANGE, range->c_str());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue