1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #14046 from mattmoor/token-investigation

Unconditionally use AuthTransport.
This commit is contained in:
Stephen Day 2015-06-25 19:07:10 -07:00
commit c7ece73fa4

View file

@ -158,9 +158,9 @@ func NewSession(client *http.Client, authConfig *cliconfig.AuthConfig, endpoint
} }
} }
if endpoint.Version == APIVersion1 { // Annotate the transport unconditionally so that v2 can
client.Transport = AuthTransport(client.Transport, authConfig, alwaysSetBasicAuth) // properly fallback on v1 when an image is not found.
} client.Transport = AuthTransport(client.Transport, authConfig, alwaysSetBasicAuth)
jar, err := cookiejar.New(nil) jar, err := cookiejar.New(nil)
if err != nil { if err != nil {