From c0f1a86c82c49ee2a6510643913b06621658baa8 Mon Sep 17 00:00:00 2001 From: xiangcheng09 <1346303623@qq.com> Date: Sat, 16 Nov 2024 11:34:08 +0800 Subject: [PATCH] fix: get ETag from resp.Body rather than resp.Header --- api-copy-object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-copy-object.go b/api-copy-object.go index 0c95d91ec..b6cadc86a 100644 --- a/api-copy-object.go +++ b/api-copy-object.go @@ -68,7 +68,7 @@ func (c *Client) CopyObject(ctx context.Context, dst CopyDestOptions, src CopySr Bucket: dst.Bucket, Key: dst.Object, LastModified: cpObjRes.LastModified, - ETag: trimEtag(resp.Header.Get("ETag")), + ETag: trimEtag(cpObjRes.ETag), VersionID: resp.Header.Get(amzVersionID), Expiration: expTime, ExpirationRuleID: ruleID,