[#182] Fix parsing signed headers in presigned urls #182

Merged
dkirillov merged 1 commit from dkirillov/frostfs-s3-gw:bugfix/presinged_url_parse_signed_headers into master 2023-08-09 07:28:03 +00:00
3 changed files with 3 additions and 1 deletions

View file

@ -12,6 +12,7 @@ This document outlines major changes between releases.
- Return appropriate 404 code when object missed in storage but there is in gate cache (#158)
- Replace part on re-upload when use multipart upload (#176)
- Fix goroutine leak on put object error (#178)
- Fix parsing signed headers in presigned urls (#182)
### Added
- Support dump metrics descriptions (#80)

View file

@ -153,7 +153,7 @@ func (c *center) Authenticate(r *http.Request) (*Box, error) {
Service: creds[3],
Region: creds[2],
SignatureV4: queryValues.Get(AmzSignature),
SignedFields: queryValues[AmzSignedHeaders],
SignedFields: strings.Split(queryValues.Get(AmzSignedHeaders), ";"),
Date: creds[1],
IsPresigned: true,
}

View file

@ -34,6 +34,7 @@ func PresignRequest(creds *credentials.Credentials, reqData RequestData, presign
}
req.Header.Set(AmzDate, presignData.SignTime.Format("20060102T150405Z"))
req.Header.Set(ContentTypeHdr, "text/plain")
signer := v4.NewSigner(creds)
signer.DisableURIPathEscaping = true