Commit d0a2301 1 parent 38d6e69 commit d0a2301 Copy full SHA for d0a2301
File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -685,9 +685,11 @@ impl ClientOptions {
685
685
builder = builder. danger_accept_invalid_certs ( true )
686
686
}
687
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 ( ) ;
688
+ // Explicitly disable compression, since it may be automatically enabled
689
+ // when certain reqwest features are enabled. Compression interferes
690
+ // 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 ( ) ;
691
693
692
694
if self . randomize_addresses . get ( ) ? {
693
695
builder = builder. dns_resolver ( Arc :: new ( dns:: ShuffleResolver ) ) ;
You can’t perform that action at this time.
0 commit comments