From 81aebf921d63c7698ccdf5bf92387e37baa4a880 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 11 Jun 2025 22:42:47 -0400 Subject: [PATCH] Add `zstd` and `deflate` to `Accept-Encoding` (#13982) ## Summary We already pull in these dependencies, so it costs us nothing. --- Cargo.toml | 2 +- crates/uv-client/src/registry_client.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3e192a3d5..0f1d02b47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -142,7 +142,7 @@ ref-cast = { version = "1.0.24" } reflink-copy = { version = "0.1.19" } regex = { version = "1.10.6" } regex-automata = { version = "0.4.8", default-features = false, features = ["dfa-build", "dfa-search", "perf", "std", "syntax"] } -reqwest = { version = "=0.12.15", default-features = false, features = ["json", "gzip", "stream", "rustls-tls", "rustls-tls-native-roots", "socks", "multipart", "http2", "blocking"] } +reqwest = { version = "=0.12.15", default-features = false, features = ["json", "gzip", "deflate", "zstd", "stream", "rustls-tls", "rustls-tls-native-roots", "socks", "multipart", "http2", "blocking"] } reqwest-middleware = { version = "0.4.0", features = ["multipart"] } reqwest-retry = { version = "0.7.0" } rkyv = { version = "0.8.8", features = ["bytecheck"] } diff --git a/crates/uv-client/src/registry_client.rs b/crates/uv-client/src/registry_client.rs index 9e8ea23b7..7dbdf7e49 100644 --- a/crates/uv-client/src/registry_client.rs +++ b/crates/uv-client/src/registry_client.rs @@ -558,7 +558,7 @@ impl RegistryClient { let simple_request = self .uncached_client(url) .get(Url::from(url.clone())) - .header("Accept-Encoding", "gzip") + .header("Accept-Encoding", "gzip, deflate, zstd") .header("Accept", MediaType::accepts()) .build() .map_err(|err| ErrorKind::from_reqwest(url.clone(), err))?;