mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[GH-ISSUE #239] Expected headers are not sent for ObjectHandle.NewReader() #2198
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#2198
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?
Originally created by @ericnorris on GitHub (May 8, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/239
The Reader you get from
ObjectHandle.NewReaderhas anAttrsfield of type ReaderObjectAttrs.The
storagelibrary fills those values in based on headers sent in the response:github.com/googleapis/google-cloud-go@bd00477b30/storage/reader.go (L255-L268)As far as I can tell,
fakestorageis not setting these headers, which means that you get something like the following when you try to use them:This library has been great, but including these headers would make it so that I can safely use the
Attrsattribute and be able to test. Thanks!@fsouza commented on GitHub (May 11, 2020):
Hi @ericnorris, thanks for reporting. Can you check if #240 fixes the issue for you?
Thanks!
@someone1 commented on GitHub (May 11, 2020):
I just conditionally added
Content-Encoding- I don't think metadata generation is supported so I couldn't add that.@ericnorris commented on GitHub (May 12, 2020):
Hey @fsouza, I just had a chance to test locally and it does seem to fix the issue. Thanks, and thanks @someone1 for the quick fix!