diff options
Diffstat (limited to 'weed/util/http_util.go')
| -rw-r--r-- | weed/util/http_util.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/weed/util/http_util.go b/weed/util/http_util.go index 5159fcd17..7cc64ea85 100644 --- a/weed/util/http_util.go +++ b/weed/util/http_util.go @@ -368,6 +368,7 @@ func ReadUrlAsReaderCloser(fileUrl string, rangeHeader string) (io.ReadCloser, e if err != nil { return nil, err } + defer CloseResponse(r) if r.StatusCode >= 400 { return nil, fmt.Errorf("%s: %s", fileUrl, r.Status) } |
