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 registrymaster
						commit
						062d6cd782
					
				| 
						 | 
					@ -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 New Issue