Disabled HTTP keep-alive in the default HTTP client for Registry calls

Upstream-commit: cff3b37a61b8da883437eec799b7b852d22538f0
Component: engine
This commit is contained in:
Sam Alba
2013-06-03 14:42:21 -07:00
parent 717b10789e
commit 306e5f4f64

View File

@ -477,9 +477,15 @@ func NewRegistry(root string) *Registry {
// If the auth file does not exist, keep going
authConfig, _ := auth.LoadConfig(root)
httpTransport := &http.Transport{
DisableKeepAlives: true,
}
r := &Registry{
authConfig: authConfig,
client: &http.Client{},
client: &http.Client{
Transport: httpTransport,
},
}
r.client.Jar = cookiejar.NewCookieJar()
return r