Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContainerRegistry: Pass through the manifest's mediaType, if set #23

Merged
merged 1 commit into from
Oct 14, 2024

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