[#160] sdk/client: Set object identifier in Head result

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-25 17:35:36 +03:00 committed by Alex Vanin
parent c814cc62fa
commit 2cc58e36f8

View file

@ -577,8 +577,11 @@ func (c *Client) getObjectHeaderV2(ctx context.Context, p *ObjectHeaderParams, o
obj := new(v2object.Object)
obj.SetHeader(hdr)
raw := object.NewRawFromV2(obj)
raw.SetID(p.addr.GetObjectID())
// convert the object
return object.NewFromV2(obj), nil
return raw.Object(), nil
}
func (p *RangeDataParams) WithAddress(v *object.Address) *RangeDataParams {