mirror of
https://github.com/versity/versitygw.git
synced 2026-09-04 07:06:59 +00:00
fix signature check when content length not included
This commit is contained in:
@@ -54,6 +54,12 @@ func CreateHttpRequestFromCtx(ctx *fiber.Ctx, signedHdrs []string) (*http.Reques
|
||||
}
|
||||
})
|
||||
|
||||
// Check if Content-Length in signed headers
|
||||
// If content length is non 0, then the header will be included
|
||||
if !includeHeader("Content-Length", signedHdrs) {
|
||||
httpReq.ContentLength = 0
|
||||
}
|
||||
|
||||
// Set the Host header
|
||||
httpReq.Host = string(req.Header.Host())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user