forked from TrueCloudLab/frostfs-http-gw
[#218] Unify system attribute format for GET/HEAD
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
1b172e5811
commit
c258db6ab3
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-http-gw/response"
|
"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) {
|
if !isValidToken(key) || !isValidValue(val) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if strings.HasPrefix(key, utils.SystemAttributePrefix) {
|
||||||
|
key = systemBackwardTranslator(key)
|
||||||
|
}
|
||||||
r.Response.Header.Set(utils.UserAttributeHeaderPrefix+key, val)
|
r.Response.Header.Set(utils.UserAttributeHeaderPrefix+key, val)
|
||||||
switch key {
|
switch key {
|
||||||
case object.AttributeTimestamp:
|
case object.AttributeTimestamp:
|
||||||
|
|
Loading…
Reference in a new issue