mirror of
https://github.com/docker/cli.git
synced 2026-08-31 10:05:19 -05:00
Merge pull request #8559 from rhatdan/404
On Red Hat Registry Servers we return 404 on certification errors. Upstream-commit: 0c7d2ff2d4a039e7531ba0e09b8dce1670208541 Component: engine
This commit is contained in:
@@ -31,7 +31,7 @@ repository.
|
||||
|
||||
> **Note:**
|
||||
> If there are multiple certificates, each will be tried in alphabetical
|
||||
> order. If there is an authentication error (e.g., 403, 5xx, etc.), Docker
|
||||
> order. If there is an authentication error (e.g., 403, 404, 5xx, etc.), Docker
|
||||
> will continue to try with the next certificate.
|
||||
|
||||
Our example is set up like this:
|
||||
|
||||
@@ -147,7 +147,10 @@ func doRequest(req *http.Request, jar http.CookieJar, timeout TimeoutType) (*htt
|
||||
client := newClient(jar, pool, cert, timeout)
|
||||
res, err := client.Do(req)
|
||||
// If this is the last cert, otherwise, continue to next cert if 403 or 5xx
|
||||
if i == len(certs)-1 || err == nil && res.StatusCode != 403 && res.StatusCode < 500 {
|
||||
if i == len(certs)-1 || err == nil &&
|
||||
res.StatusCode != 403 &&
|
||||
res.StatusCode != 404 &&
|
||||
res.StatusCode < 500 {
|
||||
return res, client, err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user