File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -685,9 +685,11 @@ impl ClientOptions {
685685            builder = builder. danger_accept_invalid_certs ( true ) 
686686        } 
687687
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 ( ) ; 
691693
692694        if  self . randomize_addresses . get ( ) ? { 
693695            builder = builder. dns_resolver ( Arc :: new ( dns:: ShuffleResolver ) ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments