Skip to content

object_store errors when reqwest gzip feature is enabled #32

@phillipleblanc

Description

@phillipleblanc

Describe the bug

Reqwest has a non-default feature gzip that will add the Content-Encoding: gzip headers and automatically decompresses the gzipped responses, with the side-effect of removing the Content-Length header. The object_store crate expects the Content-Length header to be present and will error otherwise.

This has the side-effect of code that was previously working could suddenly stop working if any dependency in the project enables the gzip feature for reqwest AND the HTTP server supports the Accept-Encoding: gzip header.

To Reproduce

I've created a minimal repro illustrating the bug here: https://github.com/phillipleblanc/object_store_gzip_repro

Expected behavior

Even if the gzip feature is enabled for reqwest, the object_store client should continue to work when making requests against HTTP servers that support gzip compression.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions