mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[PR #1141] [MERGED] Propagate ContentType field on create/modify ops #1228
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#1228
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/1141
Author: @alorlea
Created: 4/27/2023
Status: ✅ Merged
Merged: 5/2/2023
Merged by: @fsouza
Base:
main← Head:propagate-content-type-changes-to-blobs📝 Commits (3)
63851caPropagate ContentType field on create/modify ops0898af6Test for updateObject with content typee823414Update fakestorage/object_test.go📊 Changes
3 files changed (+62 additions, -5 deletions)
View changed files
📝
fakestorage/object.go(+5 -4)📝
fakestorage/object_test.go(+51 -0)📝
fakestorage/upload.go(+6 -1)📄 Description
This PR tries to address 2 bugs that where found when using some of the create/modify operations GCS supports in our integration tests that used the following interactions:
To crosscheck, we ran the same tests against the real GCS API to verify the behaviour to expect:
content-typeis provided; GCS sets it up to'application/octet-stream'or uses the one provided by the user in the BlobInfo (This is the expected behaviour for this operation in GCS).Also this behaviour is referenced on the API spec, that the
content-typeshould be set toapplication/octet-streamon object creation if it is not defined:Also should hopefully address the following issue https://github.com/fsouza/fake-gcs-server/issues/1098 🙂
Fixes #1098.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.