Fix: Typo in non canonicalized header extraction (#3480)

Extracting metadata from headers was doing wrong when Headers are not well canonicalized, fixing typo.
This commit is contained in:
Anis Elleuch 2016-12-20 20:59:08 +01:00 committed by Harshavardhana
parent d8e4d3c9c8
commit ef3319a49d

View File

@ -83,9 +83,9 @@ func extractMetadataFromHeader(header http.Header) map[string]string {
for key := range header {
cKey := http.CanonicalHeaderKey(key)
if strings.HasPrefix(cKey, "X-Amz-Meta-") {
metadata[cKey] = header.Get(cKey)
metadata[cKey] = header.Get(key)
} else if strings.HasPrefix(key, "X-Minio-Meta-") {
metadata[cKey] = header.Get(cKey)
metadata[cKey] = header.Get(key)
}
}
// Return.