getObject: Add support for special response headers.

Supports now response-content-type, response-content-disposition,
response-cache-control, response-expires.
This commit is contained in:
Harshavardhana
2016-02-07 03:37:54 -08:00
parent de79440de2
commit 99fbc0fcb3
12 changed files with 169 additions and 28 deletions

View File

@@ -308,6 +308,14 @@ func (r *Signature) DoesPresignedSignatureMatch() (bool, *probe.Error) {
query.Set("X-Amz-Expires", strconv.Itoa(expireSeconds))
query.Set("X-Amz-SignedHeaders", r.getSignedHeaders(r.extractSignedHeaders()))
query.Set("X-Amz-Credential", r.AccessKeyID+"/"+r.getScope(t))
// Save other headers available in the request parameters.
for k, v := range r.Request.URL.Query() {
if strings.HasPrefix(strings.ToLower(k), "x-amz") {
continue
}
query[k] = v
}
encodedQuery := query.Encode()
// Verify if date query is same.