summaryrefslogtreecommitdiff
path: root/client/transport.go
Commit message (Collapse)AuthorAgeFilesLines
* Add canonical import commentDaniel Nephin2018-02-051-1/+1
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Add deadcode linterDaniel Nephin2017-08-211-8/+0
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Merge pull request #29565 from yuexiao-wang/fix-typo-tlsVincent Demeester2016-12-221-1/+1
|\ | | | | Change tls to TLS
| * Change tls to TLSyuexiao-wang2016-12-201-1/+1
| | | | | | | | Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
* | Remove unused var 'errTLSConfigUnavailable' (#29626)WANG Yuexiao2016-12-211-3/+0
|/ | | Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
* client: deterministically resolve http schemeStephen J Day2016-10-111-17/+0
| | | | | | | | | | | | | | | The docker client has historically used Transport.TLSClientConfig to set the scheme for the API client. A recent moved the resolution to use the http.Transport directly, rather than save the TLSClientConfig state on a client struct. This caused issues when mutliple calls made with a single client would have this field set in the http package on pre-1.7 installations. This fix detects the presence of the TLSClientConfig once and sets the scheme accordingly. We still don't know why this issue doesn't happen with Go 1.7 but it must be more deterministic in the newer version. Signed-off-by: Stephen J Day <stephen.day@docker.com>
* client: pedantic checking of tlsconfigStephen J Day2016-09-271-13/+7
| | | | | | | | | | | | | | | | | | Under the convoluted code path for the transport configuration, TLSConfig was being set even though the socket type is unix. This caused other code detecting the TLSConfig to assume https, rather than using the http scheme. This led to a situation where if `DOCKER_CERT_PATH` is set, unix sockets start reverting to https. There is other odd behavior from go-connections that is also reproduced here. For the most part, we try to reproduce the side-effecting behavior from go-connections to retain the current docker behavior. This whole mess needs to ripped out and fixed, as this pile spaghetti is unnacceptable. This code is way to convoluted for an http client. We'll need to fix this but the Go API will break to do it. Signed-off-by: Stephen J Day <stephen.day@docker.com>
* client: remove transport packageStephen J Day2016-09-191-0/+51
This package doesn't really seem to do anything of real interest. Removing it and replacing with a few helper functions. Most of this was maintaining a fork of ctxhttp to support a mock that was unnecessary. We could probably do with a further refactor of the client interface. There is a lot of confusion of between transport, http layer and application layer that makes for some awkward code. This change improves the situation to the point where no breaking changes are introduced. Signed-off-by: Stephen J Day <stephen.day@docker.com>