mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[PR #851] [CLOSED] Add support for gzip transcoding #974
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/851
Author: @ekimekim
Created: 7/8/2022
Status: ❌ Closed
Base:
main← Head:gzip-transcoding📝 Commits (2)
1c610eaCorrectly set ContentType and ContentEncoding for resumable uploads8799771Add support for gzip transcoding📊 Changes
2 files changed (+33 additions, -7 deletions)
View changed files
📝
fakestorage/object.go(+29 -7)📝
fakestorage/upload.go(+4 -0)📄 Description
When an object has Content-Encoding: gzip, and an object download request does not have Accept-Encoding: gzip, GCS will decompress the object before serving it. This is documented here: https://cloud.google.com/storage/docs/transcoding
I've added support for this alongside the current range request logic (it's related - if we are transcoding, we ignore the range header).
To make this work for our use-case I also had to fix a bug in resumable uploads where content encoding metadata was not being set if it was specified in the request body.
EDIT: I just noticed https://github.com/fsouza/fake-gcs-server/issues/532, I believe this PR fixes that as well.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.