mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
minor
This commit is contained in:
parent
a54f30b6c6
commit
9c944377dc
|
@ -60,7 +60,7 @@ func Get(url string) ([]byte, bool, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, true, err
|
return nil, true, err
|
||||||
}
|
}
|
||||||
defer response.Body.Close()
|
defer CloseResponse(response)
|
||||||
|
|
||||||
var reader io.ReadCloser
|
var reader io.ReadCloser
|
||||||
switch response.Header.Get("Content-Encoding") {
|
switch response.Header.Get("Content-Encoding") {
|
||||||
|
@ -242,8 +242,8 @@ func ReadUrl(fileUrl string, cipherKey []byte, isContentCompressed bool, isFullC
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
defer CloseResponse(r)
|
||||||
|
|
||||||
defer r.Body.Close()
|
|
||||||
if r.StatusCode >= 400 {
|
if r.StatusCode >= 400 {
|
||||||
return 0, fmt.Errorf("%s: %s", fileUrl, r.Status)
|
return 0, fmt.Errorf("%s: %s", fileUrl, r.Status)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue