akka / alpakka

Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka.

Home Page:https://doc.akka.io/docs/alpakka/current/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GCS support offers no way to set Content-Encoding header

jroper opened this issue · comments

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.