[HttpClient] expose only gzip when doing transparent compression
This commit is contained in:
parent
ddf9e0fa1c
commit
6571dddc4c
@ -210,8 +210,8 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface
|
||||
$curlopts[CURLOPT_NOSIGNAL] = true;
|
||||
}
|
||||
|
||||
if (!isset($options['normalized_headers']['accept-encoding'])) {
|
||||
$curlopts[CURLOPT_ENCODING] = ''; // Enable HTTP compression
|
||||
if (!isset($options['normalized_headers']['accept-encoding']) && CURL_VERSION_LIBZ & self::$curlVersion['features']) {
|
||||
$curlopts[CURLOPT_ENCODING] = 'gzip'; // Expose only one encoding, some servers mess up when more are provided
|
||||
}
|
||||
|
||||
foreach ($options['headers'] as $header) {
|
||||
|
Reference in New Issue
Block a user