Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jroper opened this issue Mar 4, 2024 · 0 comments
Open

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

jroper opened this issue Mar 4, 2024 · 0 comments

Comments

@jroper
Copy link

jroper commented Mar 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants