Skip to content

Support compression in fetch() #208

@Zegnat

Description

@Zegnat

This became clear when inspecting indieweb/indiewebify-me#78.

Curl does not automatically support any compression. This is problematic as it also does not send an Accept-Encoding header. Note that not sending the header at all suggests to the server that any encoding is fine, and they are free to respond with a compressed format. It looks like most will not do this though, or this would have come up before.

I think we have two clear options:

  1. Specify a specific Accept-Encoding value of identity, which should tell servers never to send compressed data; or

  2. defining CURLOPT_ENCODING to automatically have Curl handle the compressions it knows about (DEFLATE and gzip):

    curl_setopt($ch, CURLOPT_ENCODING, '');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions