mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: http body must be drained in downloadBinary() (#16001)
This commit is contained in:
parent
7be65f66b8
commit
fd8750e959
@ -495,7 +495,7 @@ func downloadBinary(u *url.URL, mode string) (readerReturn []byte, err error) {
|
|||||||
} else {
|
} else {
|
||||||
return nil, fmt.Errorf("unsupported protocol scheme: %s", u.Scheme)
|
return nil, fmt.Errorf("unsupported protocol scheme: %s", u.Scheme)
|
||||||
}
|
}
|
||||||
|
defer xhttp.DrainBody(reader)
|
||||||
// convert a Reader to bytes
|
// convert a Reader to bytes
|
||||||
binaryFile, err := io.ReadAll(reader)
|
binaryFile, err := io.ReadAll(reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user