Merge pull request #2952 from codeaholics/2126-registry-close-wait
Closing HTTP connection after Registry ping Upstream-commit: e1278e9ec2441358fe3c93156fc55d6d04cb5c6e 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