Merge pull request #14452 from annando/issue-14451

Issue 14451: Accept GZIP content encoding
This commit is contained in:
Tobias Diekershoff 2024-09-28 08:46:14 +02:00 committed by GitHub
commit 7fa3e361dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,9 @@ class HttpClient extends BaseFactory
// Without this setting it seems as if some webservers send compressed content // Without this setting it seems as if some webservers send compressed content
// This seems to confuse curl so that it shows this uncompressed. // This seems to confuse curl so that it shows this uncompressed.
/// @todo We could possibly set this value to "gzip" or something similar /// @todo We could possibly set this value to "gzip" or something similar
RequestOptions::DECODE_CONTENT => '', //RequestOptions::DECODE_CONTENT => '',
// Fixes Issue 14451 - [Bluesky] Unexpected GZIP response from getTimeline endpoint
RequestOptions::DECODE_CONTENT => true,
RequestOptions::FORCE_IP_RESOLVE => ($this->config->get('system', 'ipv4_resolve') ? 'v4' : null), RequestOptions::FORCE_IP_RESOLVE => ($this->config->get('system', 'ipv4_resolve') ? 'v4' : null),
RequestOptions::CONNECT_TIMEOUT => 10, RequestOptions::CONNECT_TIMEOUT => 10,
RequestOptions::TIMEOUT => $this->config->get('system', 'curl_timeout', 60), RequestOptions::TIMEOUT => $this->config->get('system', 'curl_timeout', 60),