Skip to content

Use CURLOPT_ACCEPT_ENCODING instead of CURLOPT_ENCODING when avialable#960

Merged
jtojnar merged 1 commit intosimplepie:masterfrom
mmeier86:replace-curlopt-encoding-with-accept-encoding
Jan 15, 2026
Merged

Use CURLOPT_ACCEPT_ENCODING instead of CURLOPT_ENCODING when avialable#960
jtojnar merged 1 commit intosimplepie:masterfrom
mmeier86:replace-curlopt-encoding-with-accept-encoding

Conversation

@mmeier86
Copy link
Contributor

@mmeier86 mmeier86 commented Jan 1, 2026

This PR fixes #959.

It replaces the CURLOPT_ENCODING setting with CURLOPT_ACCEPT_ENCODING, but only when a cURL version newer than 7.21.6 is available.

See note on renaming in the CURLOPT_ACCEPT_ENCODING man page.

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
@mmeier86 mmeier86 force-pushed the replace-curlopt-encoding-with-accept-encoding branch from 2f42dec to 6fe31d5 Compare January 3, 2026 13:49
Alkarex added a commit to FreshRSS/simplepie 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>
Copy link
Member

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good.

@jtojnar jtojnar merged commit 6fe31d5 into simplepie:master Jan 15, 2026
10 checks passed
@jtojnar
Copy link
Member

jtojnar commented Jan 15, 2026

Turns out we do not need the second condition: #965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CURLOPT_ENCODING has been deprecated for a while in favor of CURLOPT_ACCEPT_ENCODING

4 participants