Add Accept-Encoding: identity to remaining stream paths (#2321)

## Summary

Like #2319, there are a few other places where we attempt to stream a
file.
This commit is contained in:
Charlie Marsh 2024-03-09 18:42:53 -08:00 committed by GitHub
parent a9c00024a7
commit 6866a55f20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 0 deletions

View file

@ -259,6 +259,13 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context>
.cached_client()
.uncached()
.get(wheel.url.raw().clone())
.header(
// `reqwest` defaults to accepting compressed responses.
// Specify identity encoding to get consistent .whl downloading
// behavior from servers. ref: https://github.com/pypa/pip/pull/1688
"accept-encoding",
reqwest::header::HeaderValue::from_static("identity"),
)
.build()?;
let cache_control = match self.client.connectivity() {
Connectivity::Online => CacheControl::from(