mirror of
https://github.com/minio/minio.git
synced 2025-04-20 18:44:21 -04:00
copy-object: Do not use ETag of source as MD5 as it will not be MD5 if source was uploaded as multipart. (#2938)
fixes #2934
This commit is contained in:
parent
f463d3ce42
commit
903574db90
@ -368,8 +368,9 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
|||||||
// Save other metadata if available.
|
// Save other metadata if available.
|
||||||
metadata := objInfo.UserDefined
|
metadata := objInfo.UserDefined
|
||||||
|
|
||||||
// Do not set `md5sum` as CopyObject will not keep the
|
// Remove the etag from source metadata because if it was uploaded as a multipart object
|
||||||
// same md5sum as the source.
|
// then its ETag will not be MD5sum of the object.
|
||||||
|
delete(metadata, "md5Sum")
|
||||||
|
|
||||||
sha256sum := ""
|
sha256sum := ""
|
||||||
// Create the object.
|
// Create the object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user