Skip to content

Enable CURL response decompression #277

Description

@rustyconover

Problem

The CURL client currently passes NULL to CURLOPT_ACCEPT_ENCODING, which means it does not advertise any supported compression encodings in the Accept-Encoding request header. As a result, servers never send compressed responses, leading to unnecessarily high bandwidth usage.

Proposed Solution

Change CURLOPT_ACCEPT_ENCODING from NULL to "" (empty string). Per the CURL documentation, passing an empty string causes CURL to:

  1. Advertise all compression encodings it supports (e.g. gzip, deflate, br, zstd) via the Accept-Encoding header
  2. Automatically decompress responses that use those encodings

This is a one-line change that can significantly reduce bandwidth for HTTP transfers.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions