|
@ -408,6 +408,9 @@ func ReadUrlAsReaderCloser(fileUrl string, jwt string, rangeHeader string) (*htt |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func CloseResponse(resp *http.Response) { |
|
|
func CloseResponse(resp *http.Response) { |
|
|
|
|
|
if resp == nil || resp.Body == nil { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
reader := &CountingReader{reader: resp.Body} |
|
|
reader := &CountingReader{reader: resp.Body} |
|
|
io.Copy(io.Discard, reader) |
|
|
io.Copy(io.Discard, reader) |
|
|
resp.Body.Close() |
|
|
resp.Body.Close() |
|
|