Browse Source

s3: do not close reader too early

fix https://github.com/chrislusf/seaweedfs/issues/1609
pull/1610/head
Chris Lu 4 years ago
parent
commit
73f934d5de
  1. 1
      weed/util/http_util.go

1
weed/util/http_util.go

@ -370,7 +370,6 @@ 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)
}

Loading…
Cancel
Save