From acf02bead313e256d55da6e425dd912259b4c6f6 Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Wed, 20 Jan 2016 15:22:38 -0800 Subject: [PATCH] Avoid empty Accept headers in client requests One of the keys in the manifest media type map is an empty string. This should not be sent as an Accept header. Signed-off-by: Aaron Lehmann --- manifests.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests.go b/manifests.go index aec28e97..222916b8 100644 --- a/manifests.go +++ b/manifests.go @@ -69,7 +69,9 @@ type Describable interface { // ManifestMediaTypes returns the supported media types for manifests. func ManifestMediaTypes() (mediaTypes []string) { for t := range mappings { - mediaTypes = append(mediaTypes, t) + if t != "" { + mediaTypes = append(mediaTypes, t) + } } return }