cli: avoid rely on response.ContentLength (#13120)
response.ContentLength might be invalid if the http response is chunked. fixes #13079
This commit is contained in:
committed by
Torkel Ödegaard
parent
db2264c554
commit
ee1083d9b4
@@ -152,7 +152,7 @@ func downloadFile(pluginName, filePath, url string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
r, err := zip.NewReader(bytes.NewReader(body), resp.ContentLength)
|
||||
r, err := zip.NewReader(bytes.NewReader(body), int64(len(body)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user