Set etag properly to calculated value if available (#5106)

Fixes #5100
This commit is contained in:
Harshavardhana
2017-10-24 12:25:42 -07:00
committed by Dee Koder
parent 758d5458f0
commit 5eb210dd2e
6 changed files with 26 additions and 18 deletions

View File

@@ -17,6 +17,7 @@
package cmd
import (
"encoding/hex"
"fmt"
"io"
"io/ioutil"
@@ -694,7 +695,7 @@ func (xl xlObjects) PutObjectPart(bucket, object, uploadID string, partID int, d
// Once part is successfully committed, proceed with updating XL metadata.
xlMeta.Stat.ModTime = UTCNow()
md5hex := data.MD5HexString()
md5hex := hex.EncodeToString(data.MD5Current())
// Add the current part.
xlMeta.AddObjectPart(partID, partSuffix, md5hex, file.Size)