From 6eb53152491681a30296243d6f7ee5ab68eb56d6 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 19 Mar 2015 00:24:20 -0700 Subject: [PATCH] Resource list updates --- pkg/api/api_signature.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkg/api/api_signature.go b/pkg/api/api_signature.go index cf046b7d4..d59fc4346 100644 --- a/pkg/api/api_signature.go +++ b/pkg/api/api_signature.go @@ -154,7 +154,21 @@ func writeCanonicalizedAmzHeaders(buf *bytes.Buffer, req *http.Request) { } // Resource list must be sorted: -var subResList = []string{"acl", "lifecycle", "location", "logging", "notification", "partNumber", "policy", "requestPayment", "torrent", "uploadId", "uploads", "versionId", "versioning", "versions", "website"} +var subResList = []string{ + "acl", + "location", + "logging", + "notification", + "partNumber", + "policy", + "uploadId", + "uploads", + "response-content-type", + "response-content-language", + "response-content-disposition", + "response-content-encoding", + "website", +} // From the Amazon docs: // @@ -169,6 +183,7 @@ func writeCanonicalizedResource(buf *bytes.Buffer, req *http.Request) { buf.WriteString(bucket) } buf.WriteString(req.URL.Path) + sort.Strings(subResList) if req.URL.RawQuery != "" { n := 0 vals, _ := url.ParseQuery(req.URL.RawQuery)