-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Description
curl --compressed now generates this code:
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');While curl --compressed localhost --libcurl - will show that a better code version would be:
curl_setopt($ch, CURLOPT_ENCODING, '');IOW: an empty string. According to the docs:
To aid applications not having to bother about what specific algorithms this particular libcurl build supports, libcurl allows a zero-length string to be set ("") to ask for an Accept-Encoding: header to be used that contains all built-in supported encodings.
With an empty string, we can be sure that curl will ask for compression methods it knows how to decompress, which may include the ones you've picked but may not and may also include brotli and others in the future.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels