Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Oct 14, 2024

Motivation

If the manifest blob's mediaType is set, the distribution spec requires that the HTTP Content-Type used to upload the manifest should match it.

Modifications

In putManifest, use the blob's mediaType if it is set; otherwise default to manifest.v1.

Result

If a manifest uses a different media type, it will be passed through to the registry. This might happen when copying a base image, which could have been created using the older manifest type.

Test Plan

Automated tests continue to pass. Also tested manually with different registries.

@euanh euanh added semver/minor Adds new public API. area/interoperability Improvements to compatibility with other systems. labels Oct 14, 2024
@euanh euanh force-pushed the manifest-mediatype-passthrough branch from 062465a to d5be4ee Compare October 14, 2024 17:16
@euanh euanh merged commit 714952e into apple:main Oct 14, 2024
16 checks passed
@euanh euanh deleted the manifest-mediatype-passthrough branch October 14, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/interoperability Improvements to compatibility with other systems. semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant