Performing etag off of bytes rather than md5 string

This commit is contained in:
Frederick F. Kautz IV
2015-03-16 18:15:37 -07:00
parent 583c32c774
commit 211b084e50
3 changed files with 18 additions and 11 deletions
+2 -1
View File
@@ -90,7 +90,8 @@ func generateObjectsListResult(bucket string, objects []mstorage.ObjectMetadata,
}
content.Key = object.Key
content.LastModified = object.Created.Format(iso8601Format)
content.ETag = hex.EncodeToString([]byte(object.Md5))
md5Bytes, _ := hex.DecodeString(object.Md5)
content.ETag = hex.EncodeToString(md5Bytes)
content.Size = object.Size
content.StorageClass = "STANDARD"
content.Owner = owner