Save ETag when updating metadata (#5626)

Fixes #5622
This commit is contained in:
Harshavardhana
2018-03-09 10:50:39 -08:00
committed by kannappanr
parent ba0c7544ea
commit 7aaf01eb74
3 changed files with 2 additions and 3 deletions

View File

@@ -483,9 +483,6 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
srcInfo.UserDefined[k] = v
}
// Make sure to remove saved etag if any, CopyObject calculates a new one.
delete(srcInfo.UserDefined, "etag")
// Check if x-amz-metadata-directive was not set to REPLACE and source,
// desination are same objects. Apply this restriction also when
// metadataOnly is true indicating that we are not overwriting the object.