-
Notifications
You must be signed in to change notification settings - Fork 210
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
Support setting cache-control of object #1730
Conversation
Hi, @fsouza , The simulator is very cool! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. Please update the .gitignore
file and I can merge it! 😁
Also, do you not want to set the Cache-Control header in the download object response? (
fake-gcs-server/fakestorage/object.go
Lines 885 to 899 in 5c38ffa
} else { | |
if obj.ContentType != "" { | |
w.Header().Set(contentTypeHeader, obj.ContentType) | |
} | |
// If content was transcoded, the underlying encoding was removed so we shouldn't report it. | |
if obj.ContentEncoding != "" && !transcoded { | |
w.Header().Set("Content-Encoding", obj.ContentEncoding) | |
} | |
// X-Goog-Stored-Content-Encoding must be set to the original encoding, | |
// defaulting to "identity" if no encoding was set. | |
storedContentEncoding := "identity" | |
if obj.ContentEncoding != "" { | |
storedContentEncoding = obj.ContentEncoding | |
} | |
w.Header().Set("X-Goog-Stored-Content-Encoding", storedContentEncoding) |
* Update .gitignore * Support to set object's CacheControl * Revert "Update .gitignore" This reverts commit 35d70c3. * fakestorage: set `Cache-Control` in the `downloadObject` endpoint --------- Co-authored-by: francisco souza <[email protected]>
No description provided.