mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
Closing connection after ping
Upstream-commit: fe727e2a87fa086d728664c396fd44f4be6d6afd Component: engine
This commit is contained in:
@@ -47,6 +47,8 @@ func pingRegistryEndpoint(endpoint string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.Header.Get("X-Docker-Registry-Version") == "" {
|
||||
return errors.New("This does not look like a Registry server (\"X-Docker-Registry-Version\" header not found in the response)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user