From ef3319a49d2a51fc5585fd141786b062d39d6eb7 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Tue, 20 Dec 2016 20:59:08 +0100 Subject: [PATCH] Fix: Typo in non canonicalized header extraction (#3480) Extracting metadata from headers was doing wrong when Headers are not well canonicalized, fixing typo. --- cmd/handler-utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/handler-utils.go b/cmd/handler-utils.go index 4fc0083f9..0e2c7dcf7 100644 --- a/cmd/handler-utils.go +++ b/cmd/handler-utils.go @@ -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.