Merge pull request #8559 from rhatdan/404
On Red Hat Registry Servers we return 404 on certification errors.
This commit is contained in:
commit
0c7d2ff2d4
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue