forked from TrueCloudLab/distribution
Merge pull request #18889 from aaronlehmann/v1-fallback-pull-all-tags
Allow v1 protocol fallback when pulling all tags from a repository unknown to v2 registry
This commit is contained in:
commit
062d6cd782
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ func addRequiredHeadersToRedirectedRequests(req *http.Request, via []*http.Reque
|
||||||
// ShouldV2Fallback returns true if this error is a reason to fall back to v1.
|
// ShouldV2Fallback returns true if this error is a reason to fall back to v1.
|
||||||
func ShouldV2Fallback(err errcode.Error) bool {
|
func ShouldV2Fallback(err errcode.Error) bool {
|
||||||
switch err.Code {
|
switch err.Code {
|
||||||
case errcode.ErrorCodeUnauthorized, v2.ErrorCodeManifestUnknown:
|
case errcode.ErrorCodeUnauthorized, v2.ErrorCodeManifestUnknown, v2.ErrorCodeNameUnknown:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue