Skip to content

This repo contains a minimal repro for a bug in the object_store crate where it fails on a missing Content-Length header when the gzip feature for reqwest is enabled.

Notifications You must be signed in to change notification settings

phillipleblanc/object_store_gzip_repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Store Gzip Bug Repro

This repo contains a minimal repro for a bug in the object_store crate where it fails on a missing Content-Length header when the gzip feature for reqwest is enabled.

cargo test -- --nocapture
...
running 1 test
thread 'tests::repro' panicked at src/lib.rs:15:14:
called `Result::unwrap()` on an `Err` value: Generic { store: "HTTP", source: Header { source: MissingContentLength } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test tests::repro ... FAILED

Removing the gzip feature from reqwest in Cargo.toml restores the correct behavior.

This bug happens because the reqwest crate automatically decompresses gzipped responses when the gzip feature is enabled and removes the Content-Length header in the process. The object_store crate expects the Content-Length header to be present, so it errors when it is not.

About

This repo contains a minimal repro for a bug in the object_store crate where it fails on a missing Content-Length header when the gzip feature for reqwest is enabled.

Resources

Stars

Watchers

Forks

Languages