From 850af8076210e5c299f9e462590575366b6b10bf Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Wed, 25 Jul 2018 16:25:44 +0800 Subject: [PATCH] Set the content length to -1 to let the reader read all the uploading contents in the request --- src/ui/api/chart_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/api/chart_repository.go b/src/ui/api/chart_repository.go index cff39b933..316590b40 100644 --- a/src/ui/api/chart_repository.go +++ b/src/ui/api/chart_repository.go @@ -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