Allow setting the "Cache-Control" header on PUT
Bug #1321254 reported by
Alexander Surma
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
goamz |
New
|
Undecided
|
Unassigned |
Bug Description
Both Amazon's S3 as well as Google's GCS use the `Cache-Control` header on upload to define the caching behavior. As it might be critical to not serve stale data, it would be nice to have a way to control this header on up[load.
Thinking one step further ahead, I have the following proposal: The most generic solution to this problem in my opinion is to expose the `net/http.Client` used by the `S3` and/or `Bucket` type and not rely on `net/http.
Before I submit a patch I'd like to confirm with you that this is the way to go.
Related branches
lp:~surma/goamz/put-headers
Ready for review
for merging
into
lp:goamz
- goamz maintainers: Pending requested
-
Diff: 43 lines (+14/-8)1 file modifieds3/s3.go (+14/-8)
To post a comment you must log in.
I would love a solution for this. Amazon has lots of headers you can set, but, of course, cache-control is the most important.
I think the best solution would be to overload Bucket.Put with an additional argument that contains additional headers.