Merge pull request #196 from runcom/crane-fix

vendor containers/image to fix RH
This commit is contained in:
Antonio Murdaca 2016-09-09 11:55:37 +02:00 committed by GitHub
commit 7e69022723

View File

@ -67,7 +67,12 @@ func (i *genericImage) Manifest() ([]byte, string, error) {
return nil, "", err
}
i.cachedManifest = m
if mt == "" {
if mt == "" || mt == "text/plain" {
// Crane registries can return "text/plain".
// This makes no real sense, but it happens
// because requests for manifests are
// redirected to a content distribution
// network which is configured that way.
mt = manifest.GuessMIMEType(i.cachedManifest)
}
i.cachedManifestMIMEType = mt