From 1c16cd5e9d5a1d84f388dd119e0169dc8c230998 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 9 Sep 2016 11:34:58 +0200 Subject: [PATCH] vendor containers/image to fix RH Signed-off-by: Antonio Murdaca --- vendor/github.com/containers/image/image/image.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/containers/image/image/image.go b/vendor/github.com/containers/image/image/image.go index c8ba460b..ad6fbf32 100644 --- a/vendor/github.com/containers/image/image/image.go +++ b/vendor/github.com/containers/image/image/image.go @@ -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