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 <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2016-01-20 15:22:38 -08:00
parent 182bddcf11
commit acf02bead3

View file

@ -69,8 +69,10 @@ type Describable interface {
// ManifestMediaTypes returns the supported media types for manifests.
func ManifestMediaTypes() (mediaTypes []string) {
for t := range mappings {
if t != "" {
mediaTypes = append(mediaTypes, t)
}
}
return
}