mirror of
https://github.com/distribution/distribution
synced 2024-11-12 05:45:51 +01:00
Closing connection after ping
This commit is contained in:
parent
94472f9dad
commit
c86cee210f
@ -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…
Reference in New Issue
Block a user