Use Set instead of Add in the event that the request already contains the content-length (#2683)

master
Kevin Qiu 8 years ago committed by Harshavardhana
parent 895471afa1
commit 241c56e6d7
  1. 2
      cmd/signature-v4.go

@ -354,7 +354,7 @@ func doesSignatureMatch(hashedPayload string, r *http.Request, validateRegion bo
for _, h := range signV4Values.SignedHeaders {
if h == "content-length" {
header = cloneHeader(req.Header)
header.Add("content-length", strconv.FormatInt(r.ContentLength, 10))
header.Set("content-length", strconv.FormatInt(r.ContentLength, 10))
break
}
}

Loading…
Cancel
Save