From c18789f1e9313fea63f013a13f211dd0c0ecfb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A6=99=E6=A9=9909?= <1346303623@qq.com> Date: Sat, 18 Jan 2025 16:30:19 +0800 Subject: [PATCH] fix: get ETag for CopyObject response rather than response Headers (#2019) --- 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 0c95d91ec7..b6cadc86a9 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,