Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Oct 15, 2024

Motivation

The registry indicates that it supports the v2 protocol by returning a [200 OK response](See https://github.com/opencontainers/distribution-spec/blob/main/spec.md#determining-support)

Many registries also set Content-Type: application/json and return empty JSON objects in their responses but this is not required and some, such as ECR, return empty responses.

Modifications

Do not require the API check response to contain an empty JSON object.

Result

Pushing to ECR will no longer fail with an "The given data was not valid JSON." error message.

Test Plan

Automated tests continue to pass, tested manually with ECR.

@euanh euanh added kind/bug Something isn't working semver/minor Adds new public API. area/interoperability Improvements to compatibility with other systems. labels Oct 15, 2024
@euanh
Copy link
Collaborator Author

euanh commented Oct 15, 2024

This change fixes the "The given data was not valid JSON." message reported in #14, but pushing to ECR still does not yet work because of #17.

@euanh euanh merged commit bb85677 into apple:main Oct 15, 2024
16 checks passed
@euanh euanh deleted the checkapi-response-empty branch October 15, 2024 07:44
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. kind/bug Something isn't working semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant