Merge pull request #1383 from aaronlehmann/default-manifest-type
If the media type for a manifest is unrecognized, default to schema1
This commit is contained in:
commit
c301f8ab27
2 changed files with 23 additions and 6 deletions
|
@ -97,7 +97,10 @@ func UnmarshalManifest(ctHeader string, p []byte) (Manifest, Descriptor, error)
|
|||
|
||||
unmarshalFunc, ok := mappings[mediatype]
|
||||
if !ok {
|
||||
return nil, Descriptor{}, fmt.Errorf("unsupported manifest mediatype: %s", mediatype)
|
||||
unmarshalFunc, ok = mappings[""]
|
||||
if !ok {
|
||||
return nil, Descriptor{}, fmt.Errorf("unsupported manifest mediatype and no default available: %s", mediatype)
|
||||
}
|
||||
}
|
||||
|
||||
return unmarshalFunc(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue