1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56:01 +01:00

Recognize "identity" compression method

Some binary caches (incorrectly) use this header to indicate lack of
compression, inspired by the valid "identity" token in the
"Accept-Encoding" header.
This commit is contained in:
WxNzEMof 2025-08-04 17:00:38 +00:00
parent 485cbfc7f1
commit 0a96b7e627

View file

@ -215,7 +215,7 @@ std::string decompress(const std::string & method, std::string_view in)
std::unique_ptr<FinishSink> makeDecompressionSink(const std::string & method, Sink & nextSink) std::unique_ptr<FinishSink> makeDecompressionSink(const std::string & method, Sink & nextSink)
{ {
if (method == "none" || method == "") if (method == "none" || method == "" || method == "identity")
return std::make_unique<NoneSink>(nextSink); return std::make_unique<NoneSink>(nextSink);
else if (method == "br") else if (method == "br")
return std::make_unique<BrotliDecompressionSink>(nextSink); return std::make_unique<BrotliDecompressionSink>(nextSink);