tests: Fix hasExtendedHeader tests with env variable.

This commit is contained in:
Harshavardhana
2016-08-15 16:09:08 -07:00
parent bb8a425d49
commit 3d1bb8f439
2 changed files with 12 additions and 6 deletions
+3
View File
@@ -587,6 +587,9 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload
// Save additional metadata only if extended headers such as "X-Amz-Meta-" are set.
if hasExtendedHeader(fsMeta.Meta) {
if len(fsMeta.Meta) == 0 {
fsMeta.Meta = make(map[string]string)
}
fsMeta.Meta["md5Sum"] = s3MD5
// Write the metadata to a temp file and rename it to the actual location.