Merge pull request #2952 from codeaholics/2126-registry-close-wait
Closing HTTP connection after Registry ping
This commit is contained in:
commit
e1278e9ec2
1 changed files with 2 additions and 0 deletions
|
@ -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)")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue