From 7c89237104b9ea35ae262b1ed9e43575a1fbd01a Mon Sep 17 00:00:00 2001 From: Arlo Siemsen Date: Tue, 25 Oct 2022 17:36:39 -0500 Subject: [PATCH] Add Accept-Encoding request header to enable compression --- src/cargo/ops/registry.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cargo/ops/registry.rs b/src/cargo/ops/registry.rs index 80772e03998..aded54ab63d 100644 --- a/src/cargo/ops/registry.rs +++ b/src/cargo/ops/registry.rs @@ -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 { let version = match s { "default" => SslVersion::Default,