[#218] Unify system attribute format for GET/HEAD

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-10-27 16:32:55 +03:00 committed by Alex Vanin
parent 1b172e5811
commit c258db6ab3

View file

@ -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: