mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-22 06:41:36 +01:00
Set the content length to -1 to let the reader read all the uploading contents in the request
This commit is contained in:
parent
07bfad968a
commit
850af80762
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user