Set the content length to -1 to let the reader read all the uploading contents in the request

This commit is contained in:
Steven Zou 2018-07-25 16:25:44 +08:00
parent 07bfad968a
commit 850af80762

View File

@ -406,7 +406,7 @@ func (cra *ChartRepositoryAPI) rewriteFileContent(files []formFile, request *htt
}
request.Header.Set(headerContentType, w.FormDataContentType())
request.ContentLength = int64(body.Len())
request.ContentLength = -1
request.Body = ioutil.NopCloser(&body)
return nil