[#307] Filter system metadata

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-01-20 17:36:21 +03:00 committed by Angira Kekteeva
parent d532eb710f
commit c202893563
4 changed files with 11 additions and 2 deletions

View file

@ -88,7 +88,10 @@ func (n *layer) putSystemObjectIntoNeoFS(ctx context.Context, p *PutSystemObject
for k, v := range p.Metadata {
attr := object.NewAttribute()
attr.SetKey(p.Prefix + k)
if !IsSystemHeader(k) {
k = p.Prefix + k
}
attr.SetKey(k)
if p.Prefix == tagPrefix && v == "" {
v = tagEmptyMark
}