Merge pull request #5393 from steven-zou/fix_content_length_issue

Set the content length to -1 to let the reader read all the uploading…
This commit is contained in:
Steven Zou 2018-07-25 17:08:32 +08:00 committed by GitHub
commit b8c7a8cb68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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