Skip to content

Commit

Permalink
Add Accept-Encoding request header to enable compression
Browse files Browse the repository at this point in the history
  • Loading branch information
arlosi committed Oct 25, 2022
1 parent 8adf1df commit 7c89237
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cargo/ops/registry.rs
Expand Up @@ -643,6 +643,9 @@ pub fn configure_http_handle(config: &Config, handle: &mut Easy) -> CargoResult<
handle.useragent(&format!("cargo {}", version()))?;
}

// Empty string accept encoding expands to the encodings supported by the current libcurl.
handle.accept_encoding("")?;

fn to_ssl_version(s: &str) -> CargoResult<SslVersion> {
let version = match s {
"default" => SslVersion::Default,
Expand Down

0 comments on commit 7c89237

Please sign in to comment.