mirror of
https://github.com/containers/skopeo.git
synced 2025-05-03 05:26:32 +00:00
Close a HTTP response body
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
5a8d72635c
commit
fe5c4091ee
@ -116,6 +116,7 @@ func (t *testRegistryV2) Ping() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized {
|
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized {
|
||||||
return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode)
|
return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user