mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
object: PutObjectHandler should set the md5Sum properly. (#1604)
Additionally add a test case as well for validating for us to reply BadDigest properly. Fixes #1603
This commit is contained in:
@@ -603,7 +603,7 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
|
||||
// Save metadata.
|
||||
metadata := make(map[string]string)
|
||||
// Make sure we hex encode here.
|
||||
metadata["md5"] = hex.EncodeToString(md5Bytes)
|
||||
metadata["md5Sum"] = hex.EncodeToString(md5Bytes)
|
||||
// Create object.
|
||||
md5Sum, err = api.ObjectAPI.PutObject(bucket, object, size, reader, metadata)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user