Skip to content

Set "Accept-Encoding: identity" header when curl'ing sources #88

Closed

Description

@vrothberg

Bringing the conversation from https://gitlab.com/redhat/hummingbird/rpms/-/merge_requests/66#note_2984270969 over here:

Looks like your tools are affected by https://pagure.io/fedora-infrastructure/issue/12812 or a similar issue from other servers that suffer from "content encoding confusion".
You will need to set the Accept-Encoding: identity HTTP header when doing source downloads, otherwise you get an on-the-fly un-gzipped file with a ".tar.gz" file extension (that is actually just an uncompressed "tar" file).

Setting header = \"Accept-Encoding: identity\" in the .curlrc fixes the issue but I think it would be great if dist-git could take care of it directly.

Activity

  1. added a commit that references this issue on Jan 5, 2026
  2. xsuchy commented on Jan 6, 2026

    @xsuchy
    Contributor

    The only thing is that we set on the server content-type: application/octet-stream, but I believe that is wrong. The content is gzip-ed. And when we know, we should indicate it. It is client responsibility to indicate what he wants. And act accordingly.

  3. xsuchy commented on Jan 6, 2026

    @xsuchy
    Contributor
  4. vrothberg commented on Jan 6, 2026

    @vrothberg
    Author

    Hmm, we can add it here https://github.com/release-engineering/dist-git/blob/main/dist-git-client/dist_git_client.py#L111

    Yes, that's what I had in mind. As an immediate patch, we use the .curlrc trick (see https://gitlab.com/redhat/hummingbird/rpms/-/merge_requests/144/diffs?commit_id=adc35f627bb9c9bc948e67a332bf15a1fc6fdad6) but other users may hit it as well.

  5. praiskup commented on Jan 27, 2026

    @praiskup
    Member
  6. added a commit that references this issue on Feb 9, 2026
    00aa505
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