Merged
Conversation
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
…accept-encoding' into merge-mmeier86
…-for-bad-content-encoding' into merge-mmeier86
This was referenced Jan 3, 2026
Closed
Alkarex
added a commit
to mmeier86/FreshRSS
that referenced
this pull request
Jan 3, 2026
Alkarex
added a commit
to FreshRSS/FreshRSS
that referenced
this pull request
Jan 3, 2026
…LOPT_ENCODING (#8376) * Replace deprecated CURLOPT_ENCODING The CURLOPT_ENCODING setting has been deprecated in favor of CURLOPT_ACCEPT_ENCODING. Signed-off-by: Michael Meier <mmeier1986@gmail.com> * Sync with our SimplePie fork PR FreshRSS/simplepie#67 simplepie/simplepie#960 simplepie/simplepie#962 * Our SimplePie PR merged --------- Signed-off-by: Michael Meier <mmeier1986@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@mmeier86