Skip to content

Commit ce3eee4

Browse files
authored
Merge pull request #398 from wking/media-type-conflicts
media-types: Describe media type conflict resolution
2 parents 75846b3 + d1d092d commit ce3eee4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

media-types.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ The following media types identify the formats described here and their referenc
99
- `application/vnd.oci.image.layer.v1.tar+gzip`: ["Layer", as a gzipped tar archive](layer.md)
1010
- `application/vnd.oci.image.layer.nondistributable.v1.tar+gzip`: ["Layer", as a gzipped tar archive with distribution restrictions](layer.md#non-distributable-layers)
1111

12+
## Media Type Conflicts
13+
14+
[Blob](image-layout.md) retrieval methods MAY return media type metadata.
15+
For example, a HTTP response might return a manifest with the Content-Type header set to `application/vnd.oci.image.manifest.v1+json`.
16+
Implementations MAY also have expectations for the blob's media type and digest (e.g. from a [descriptor](descriptor.md) referencing the blob).
17+
18+
* Implementations that do not have an expected media type for the blob SHOULD respect the returned media type.
19+
* Implementations that have an expected media type which matches the returned media type SHOULD respect the matched media type.
20+
* Implementations that have an expected media type which does not match the returned media type SHOULD:
21+
* Respect the expected media type if the blob matches the expected digest.
22+
Implementations MAY warn about the media type mismatch.
23+
* Return an error if the blob does not match the expected digest (as [recommended for descriptors](descriptor.md#properties)).
24+
* Return an error if they do not have an expected digest.
25+
1226
## Compatibility Matrix
1327

1428
The OCI Image Specification strives to be backwards and forwards compatible when possible.

0 commit comments

Comments
 (0)