Add zstd and deflate to Accept-Encoding (#13982)

## Summary

We already pull in these dependencies, so it costs us nothing.
This commit is contained in:
Charlie Marsh 2025-06-11 22:42:47 -04:00 committed by GitHub
parent f530565323
commit 81aebf921d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -142,7 +142,7 @@ ref-cast = { version = "1.0.24" }
reflink-copy = { version = "0.1.19" } reflink-copy = { version = "0.1.19" }
regex = { version = "1.10.6" } regex = { version = "1.10.6" }
regex-automata = { version = "0.4.8", default-features = false, features = ["dfa-build", "dfa-search", "perf", "std", "syntax"] } 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-middleware = { version = "0.4.0", features = ["multipart"] }
reqwest-retry = { version = "0.7.0" } reqwest-retry = { version = "0.7.0" }
rkyv = { version = "0.8.8", features = ["bytecheck"] } rkyv = { version = "0.8.8", features = ["bytecheck"] }

View file

@ -558,7 +558,7 @@ impl RegistryClient {
let simple_request = self let simple_request = self
.uncached_client(url) .uncached_client(url)
.get(Url::from(url.clone())) .get(Url::from(url.clone()))
.header("Accept-Encoding", "gzip") .header("Accept-Encoding", "gzip, deflate, zstd")
.header("Accept", MediaType::accepts()) .header("Accept", MediaType::accepts())
.build() .build()
.map_err(|err| ErrorKind::from_reqwest(url.clone(), err))?; .map_err(|err| ErrorKind::from_reqwest(url.clone(), err))?;