You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: media-types.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,20 @@ The following media types identify the formats described here and their referenc
9
9
-`application/vnd.oci.image.layer.v1.tar+gzip`: ["Layer", as a gzipped tar archive](layer.md)
10
10
-`application/vnd.oci.image.layer.nondistributable.v1.tar+gzip`: ["Layer", as a gzipped tar archive with distribution restrictions](layer.md#non-distributable-layers)
11
11
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
+
12
26
## Compatibility Matrix
13
27
14
28
The OCI Image Specification strives to be backwards and forwards compatible when possible.
0 commit comments