mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Use Set instead of Add in the event that the request already contains the content-length (#2683)
This commit is contained in:
parent
895471afa1
commit
241c56e6d7
@ -354,7 +354,7 @@ func doesSignatureMatch(hashedPayload string, r *http.Request, validateRegion bo
|
|||||||
for _, h := range signV4Values.SignedHeaders {
|
for _, h := range signV4Values.SignedHeaders {
|
||||||
if h == "content-length" {
|
if h == "content-length" {
|
||||||
header = cloneHeader(req.Header)
|
header = cloneHeader(req.Header)
|
||||||
header.Add("content-length", strconv.FormatInt(r.ContentLength, 10))
|
header.Set("content-length", strconv.FormatInt(r.ContentLength, 10))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user