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>
This commit is contained in:
Josh 2025-06-19 09:55:47 -04:00 committed by GitHub
parent 5d81e74a4d
commit 2a2383a818
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,7 +85,8 @@ class Client implements IClient {
}
if (!isset($options[RequestOptions::HEADERS]['Accept-Encoding'])) {
$options[RequestOptions::HEADERS]['Accept-Encoding'] = 'gzip';
// let curl populate with whatever encodings it has been built with
$options['curl'][CURLOPT_ACCEPT_ENCODING] = '';
}
// Fallback for save_to