We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef1337a commit 1c9b247Copy full SHA for 1c9b247
src/client/mod.rs
@@ -685,9 +685,11 @@ impl ClientOptions {
685
builder = builder.danger_accept_invalid_certs(true)
686
}
687
688
- // Reqwest will remove the `Content-Length` header if it is configured to
689
- // transparently decompress the body via the non-default `gzip` feature.
690
- builder = builder.no_gzip();
+ // Explicitly disable compression, since it may be automatically enabled
+ // when certain reqwest features are enabled. Compression interferes
+ // with the `Content-Length` header, which is used to determine the
691
+ // size of objects.
692
+ builder = builder.no_gzip().no_brotli().no_zstd().no_deflate();
693
694
if self.randomize_addresses.get()? {
695
builder = builder.dns_resolver(Arc::new(dns::ShuffleResolver));
0 commit comments