Skip to content

Conversation

mmeier86 and others added 4 commits January 1, 2026 12:17
Setting the CURLOPT_ENCODING to 'none' is not officially supported by
cURL. Setting it in case of cURL receiving an invalid Content-Encoding
header from the server and re-trying would not fix the issue.

The current implementation already sets cURL up to send an Accept-Encoding
header with all supported encodings a couple of lines above this change.
If the fetch still returns a BAD_CONTENT_ENCODING error, the server already
ignored the Accept-Encoding headers once.

This change, instead of sending 'none' in a re-try, disables cURL's content
encoding handling (in practice, handling compression).
The CURLOPT_ENCODING option is obsolete since cURL 7.21.6, in favor of
CURLOPT_ACCEPT_ENCODING.

I've put the updated option name behind a cURL version check, as
SimplePie supports older PHP versions which in turn support older cURL
versions which don't have the updated option name yet.

See:
https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
…-for-bad-content-encoding' into merge-upstream
@Alkarex
Copy link
Member Author

Alkarex commented Jan 3, 2026

Upstream bugs to fix first. We re-do another PR.

@Alkarex Alkarex closed this Jan 3, 2026
@Alkarex
Copy link
Member Author

Alkarex commented Jan 3, 2026

Replaced by #67

@Alkarex Alkarex deleted the merge-upstream branch January 17, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants