forked from TrueCloudLab/frostfs-s3-gw
[#339] Fix stream sigV4a chunk-encoding
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
4515a7ae88
commit
11c1a86404
2 changed files with 58 additions and 1 deletions
|
@ -136,7 +136,7 @@ func (c *s3v4aChunkReader) Read(buf []byte) (num int, err error) {
|
|||
// Once we have read the entire chunk successfully, we verify
|
||||
// that the received signature is valid.
|
||||
|
||||
n, err := hex.Decode(signature[:], bytes.TrimSuffix(signature[:], []byte("**"))[16:])
|
||||
n, err := hex.Decode(signature[:], bytes.TrimRight(signature[:], "*")[16:])
|
||||
if err != nil {
|
||||
c.err = errMalformedChunkedEncoding
|
||||
return num, c.err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue