Skip to content

Commit 2a2383a

Browse files
fix(HttpClient): let local curl set encoding based what it is built with
Previously we forced it to gzip but it's possible for a local curl: - not to have been built with gzip - to support additional encoding types In most cases this won't change behavior (i.e. gzip will still be used). Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 5d81e74 commit 2a2383a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/private/Http/Client/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ private function buildRequestOptions(array $options): array {
8585
}
8686

8787
if (!isset($options[RequestOptions::HEADERS]['Accept-Encoding'])) {
88-
$options[RequestOptions::HEADERS]['Accept-Encoding'] = 'gzip';
88+
// let curl populate with whatever encodings it has been built with
89+
$options['curl'][CURLOPT_ACCEPT_ENCODING] = '';
8990
}
9091

9192
// Fallback for save_to

0 commit comments

Comments
 (0)