forked from TrueCloudLab/frostfs-api-go
[#138] sdk/object: Fix head request
Now head request returns full header with signature. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
581cb2d2ba
commit
efbf73b775
1 changed files with 6 additions and 1 deletions
|
@ -564,7 +564,12 @@ func (c *Client) getObjectHeaderV2(ctx context.Context, p *ObjectHeaderParams, o
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
hdr = v.GetHeader()
|
hdrWithSig := v.GetHeaderWithSignature()
|
||||||
|
if hdrWithSig == nil {
|
||||||
|
return nil, errors.New("got nil instead of header with signature")
|
||||||
|
}
|
||||||
|
hdr = hdrWithSig.GetHeader()
|
||||||
|
// todo: check signature there
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unexpected Head object type %T", v))
|
panic(fmt.Sprintf("unexpected Head object type %T", v))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue