Skip to content

Add Accept-Encoding header to fetch method#283

Open
gRegorLove wants to merge 2 commits into
microformats:mainfrom
gRegorLove:dev/208
Open

Add Accept-Encoding header to fetch method#283
gRegorLove wants to merge 2 commits into
microformats:mainfrom
gRegorLove:dev/208

Conversation

@gRegorLove

Copy link
Copy Markdown
Member

Closes #208

@gRegorLove gRegorLove added this to the 0.5.1 milestone Jun 25, 2026
Comment thread Mf2/Parser.php Outdated
Comment thread Mf2/Parser.php Outdated
@Zegnat

Zegnat commented Jun 27, 2026

Copy link
Copy Markdown
Member

I do not think we have to be known for fetching, or supporting all those cases. So I would lean towards not supporting retries. It is always possible for someone to feed the data into Mf2\parse after they have gotten it themselves.

It would be good to support both constants, as @jtojnar says, based on the data that PHP gives us:

  1. CURLOPT_ENCODING: “Available as of cURL 7.10 and deprecated as of cURL 7.21.6.”
  2. CURLOPT_ACCEPT_ENCODING: “Available as of cURL 7.21.6.”

Probably just based on curl_version(), using version_compare()? Again, unlike SimplePie, I would not try to make that logic any harder than it has to be.

@gRegorLove gRegorLove requested a review from Zegnat July 8, 2026 20:18
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.

Support compression in fetch()

3 participants