Merge branch 'graph' of ssh://github.com/dotcloud/docker into graph

Upstream-commit: d9471bee3da16f7cef1f7bf5d7d1b202514a1f3d
Component: engine
This commit is contained in:
Solomon Hykes
2013-03-23 12:39:36 -07:00

View File

@ -80,14 +80,14 @@ func (graph *Graph) getRemoteHistory(imgId string, authConfig *auth.AuthConfig)
// Check if an image exists in the Registry
func (graph *Graph) LookupRemoteImage(imgId string, authConfig *auth.AuthConfig) bool {
client := &http.Client{}
rt := &http.Transport{Proxy: http.ProxyFromEnvironment}
req, err := http.NewRequest("GET", REGISTRY_ENDPOINT+"/images/"+imgId+"/json", nil)
if err != nil {
return false
}
req.SetBasicAuth(authConfig.Username, authConfig.Password)
res, err := client.Do(req)
res, err := rt.RoundTrip(req)
if err != nil || res.StatusCode != 307 {
return false
}