vendor containers/image to fix RH

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca
2016-09-09 11:34:58 +02:00
parent 362bfc5fe3
commit 1c16cd5e9d

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