mirror of
https://github.com/docker/cli.git
synced 2026-11-06 13:10:41 -04:00
vendor: github.com/moby/moby/client v0.7.0-dev (402d0a16f131)
full diff: https://github.com/moby/moby/compare/client/v0.6.2...402d0a16f131 Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
+2
-2
@@ -108,7 +108,7 @@ const DummyHost = "api.moby.localhost"
|
||||
// overriding the version and disable API-version negotiation.
|
||||
//
|
||||
// This version may be lower than the version of the api library module used.
|
||||
const MaxAPIVersion = "1.56"
|
||||
const MaxAPIVersion = "1.57"
|
||||
|
||||
// MinAPIVersion is the minimum API version supported by the client. API versions
|
||||
// below this version are not considered when performing API-version negotiation.
|
||||
@@ -436,7 +436,7 @@ func (cli *Client) dialer() func(context.Context) (net.Conn, error) {
|
||||
return dialPipeContext(ctx, cli.addr)
|
||||
default:
|
||||
if tlsConfig := cli.tlsConfig(); tlsConfig != nil {
|
||||
return tls.Dial(cli.proto, cli.addr, tlsConfig)
|
||||
return (&tls.Dialer{Config: tlsConfig}).DialContext(ctx, cli.proto, cli.addr)
|
||||
}
|
||||
return net.Dial(cli.proto, cli.addr)
|
||||
}
|
||||
|
||||
+3
-1
@@ -100,8 +100,10 @@ func (cli *Client) setupHijackConn(req *http.Request, proto string) (retConn net
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
// Closing the body ends the otelhttp span. A 101 response has no body,
|
||||
// so this does not close the connection.
|
||||
_ = resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusSwitchingProtocols {
|
||||
_ = resp.Body.Close()
|
||||
return nil, "", fmt.Errorf("unable to upgrade to %s, received %d", proto, resp.StatusCode)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user