This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new d0a2301697 object_store: Disable all compression formats in HTTP
reqwest client (#7143)
d0a2301697 is described below
commit d0a2301697f8a0fe5fc267bc35fd959103e6ec4e
Author: Kyle Lacy <[email protected]>
AuthorDate: Wed Feb 19 00:30:38 2025 -0800
object_store: Disable all compression formats in HTTP reqwest client (#7143)
---
object_store/src/client/mod.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/object_store/src/client/mod.rs b/object_store/src/client/mod.rs
index 6297159556..11f8b3e8e4 100644
--- a/object_store/src/client/mod.rs
+++ b/object_store/src/client/mod.rs
@@ -685,9 +685,11 @@ impl ClientOptions {
builder = builder.danger_accept_invalid_certs(true)
}
- // Reqwest will remove the `Content-Length` header if it is configured
to
- // transparently decompress the body via the non-default `gzip`
feature.
- 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
+ // size of objects.
+ builder = builder.no_gzip().no_brotli().no_zstd().no_deflate();
if self.randomize_addresses.get()? {
builder = builder.dns_resolver(Arc::new(dns::ShuffleResolver));