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

Extracting metadata from headers was doing wrong when Headers are not well canonicalized, fixing typo.
master
Anis Elleuch 8 years ago committed by Harshavardhana
parent d8e4d3c9c8
commit ef3319a49d
  1. 4
      cmd/handler-utils.go

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

Loading…
Cancel
Save