From 4fd7afa2db9536ba80a236493c282841bce00d68 Mon Sep 17 00:00:00 2001 From: zveinn Date: Mon, 8 Jan 2024 13:52:54 +0000 Subject: [PATCH] Adding comment and fixing capitalization of ETag constant --- api-get-object-attributes.go | 2 +- constants.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api-get-object-attributes.go b/api-get-object-attributes.go index 7f0b55fa6..000ffb77c 100644 --- a/api-get-object-attributes.go +++ b/api-get-object-attributes.go @@ -177,7 +177,7 @@ func (c *Client) GetObjectAttributes(ctx context.Context, bucketName, objectName defer closeResponse(resp) - hasEtag := resp.Header.Get(Etag) + hasEtag := resp.Header.Get(ETag) if hasEtag != "" { return ObjectAttributes{}, errors.New("getObjectAttributes is not supported by the current endpoint version") } diff --git a/constants.go b/constants.go index 5d9827dfc..4099a37f9 100644 --- a/constants.go +++ b/constants.go @@ -70,7 +70,9 @@ const ( const ( // Response Headers - Etag = "ETag" + + // ETag is a common response header + ETag = "ETag" // Storage class header. amzStorageClass = "X-Amz-Storage-Class"