From c258db6ab334a692a9d9a4699efd71b5aef0b155 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 27 Oct 2022 16:32:55 +0300 Subject: [PATCH] [#218] Unify system attribute format for GET/HEAD Signed-off-by: Denis Kirillov --- downloader/head.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/downloader/head.go b/downloader/head.go index eafed21..3267228 100644 --- a/downloader/head.go +++ b/downloader/head.go @@ -4,6 +4,7 @@ import ( "io" "net/http" "strconv" + "strings" "time" "github.com/nspcc-dev/neofs-http-gw/response" @@ -55,6 +56,9 @@ func (r request) headObject(clnt *pool.Pool, objectAddress oid.Address) { if !isValidToken(key) || !isValidValue(val) { continue } + if strings.HasPrefix(key, utils.SystemAttributePrefix) { + key = systemBackwardTranslator(key) + } r.Response.Header.Set(utils.UserAttributeHeaderPrefix+key, val) switch key { case object.AttributeTimestamp: