1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/distribution
Aaron Lehmann 5e8af46fda Smarter push/pull TLS fallback
With the --insecure-registry daemon option (or talking to a registry on
a local IP), the daemon will first try TLS, and then try plaintext if
something goes wrong with the push or pull. It doesn't make sense to try
plaintext if a HTTP request went through while using TLS. This commit
changes the logic to keep track of host/port combinations where a TLS
attempt managed to do at least one HTTP request (whether the response
code indicated success or not). If the host/port responded to a HTTP
using TLS, we won't try to make plaintext HTTP requests to it.

This will result in better error messages, which sometimes ended up
showing the result of the plaintext attempt, like this:

    Error response from daemon: Get
    http://myregistrydomain.com:5000/v2/: malformed HTTP response
    "\x15\x03\x01\x00\x02\x02"

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-02-12 13:47:48 -08:00
..
fixtures/validate_manifest Add distribution package 2015-11-24 09:40:24 -08:00
metadata Changes cross-repository blob mounting to a blob Create option 2016-01-14 14:26:03 -08:00
xfer Move temporary download file to download descriptor scope 2016-02-09 14:12:28 -08:00
errors.go Smarter push/pull TLS fallback 2016-02-12 13:47:48 -08:00
pull.go Smarter push/pull TLS fallback 2016-02-12 13:47:48 -08:00
pull_v1.go Push/pull errors improvement and cleanup 2016-02-11 16:28:56 -08:00
pull_v2.go Smarter push/pull TLS fallback 2016-02-12 13:47:48 -08:00
pull_v2_test.go Add schema2 pull support 2016-01-08 17:24:21 -08:00
pull_v2_unix.go Add distribution package 2015-11-24 09:40:24 -08:00
pull_v2_windows.go Add distribution package 2015-11-24 09:40:24 -08:00
push.go Smarter push/pull TLS fallback 2016-02-12 13:47:48 -08:00
push_v1.go Remove the use of dockerversion from the registry package 2016-01-15 12:43:54 -05:00
push_v2.go Smarter push/pull TLS fallback 2016-02-12 13:47:48 -08:00
registry.go Smarter push/pull TLS fallback 2016-02-12 13:47:48 -08:00
registry_unit_test.go distribution: add test to ensure pass-thru registry token is host-bound 2016-01-28 16:23:06 -08:00