mirror of
https://github.com/containers/skopeo.git
synced 2025-04-27 11:01:18 +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 {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized {
|
||||
return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user