Skip to content

filetransfer: Use libcurl for Content-Encoding/Transfer-Encoding transparent decompression#15336

Merged
Ericson2314 merged 2 commits intomasterfrom
libcurl-content-encoding
Feb 26, 2026
Merged

filetransfer: Use libcurl for Content-Encoding/Transfer-Encoding transparent decompression#15336
Ericson2314 merged 2 commits intomasterfrom
libcurl-content-encoding

Conversation

@xokdvium
Copy link
Contributor

Motivation

Get rid of manual decompression entirely. We can support zstd, br,
deflate (which was broken previously) and gzip/x-gzip encodings via curl
without manual work on our side. This is the same approach that was taken by lix.

Also adds some tests for x-gzip support.

Context

Fixes #14324.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Wastes slightly less memory. Also gets the doc-comments in order.
@xokdvium xokdvium disabled auto-merge February 25, 2026 19:38
@xokdvium xokdvium force-pushed the libcurl-content-encoding branch 2 times, most recently from 361c82f to 0f8d999 Compare February 25, 2026 21:28

pkg_hash = get_package_hash(PKGS['C'])

# Verify .narinfo has xz compression
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think using xz here was clearly a mistake, because no other http client can actually decompress such stuff...

…sparent decompression

Get rid of manual decompression entirely. We can support zstd, br,
deflate (which was broken previously) and gzip/x-gzip encodings via curl
without manual work on our side. This is the same approach that was taken by lix.

Also adds some tests for x-gzip support.
@xokdvium xokdvium force-pushed the libcurl-content-encoding branch from 0f8d999 to fa07d9d Compare February 25, 2026 22:29
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 25, 2026
Merged via the queue into master with commit 02bb3d0 Feb 26, 2026
19 checks passed
@Ericson2314 Ericson2314 deleted the libcurl-content-encoding branch February 26, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content-Encoding: x-gzip should be supported

3 participants