Skip to content

GCS support offers no way to set Content-Encoding header #3137

@jroper

Description

@jroper

The Content-Encoding header is an important header for GCS, it allows you to upload content which has been gzipped, saving on storage costs, and then when GCS serves the content, it will transcode it as necessary, unzipping if a client doesn't supply an Accept-Encoding: gzip header. See the gcs docs. The problem is, the Alpakka GCS API provides no means to set the Content-Encoding header on an object when uploading. Setting it in the object custom metadata doesn't work, GCS will ignore any Content-Encoding values specified in the custom metadata, it must be set as an HTTP header similar to Content-Type.

I believe there are other metadata headers that can only be supplied as HTTP headers, and not as custom metadata, but I haven't tested those.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions