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

Relax the Content-Type header check in conformance /03_discovery_test #456

Closed
northtyphoon opened this issue Aug 15, 2023 · 4 comments
Closed
Milestone

Comments

@northtyphoon
Copy link

northtyphoon commented Aug 15, 2023

The following validation requires the server return Content-Type header application/vnd.oci.image.index.v1+json exactly. If the server returns application/vnd.oci.image.index.v1+json; charset=utf-8, it would fail. Can the test relax the validation to allow the additional charset parameter?

Expect(resp.Header().Get("Content-Type")).To(Equal("application/vnd.oci.image.index.v1+json"))

Expect(resp.Header().Get("Content-Type")).To(Equal("application/vnd.oci.image.index.v1+json"))

Expect(resp.Header().Get("Content-Type")).To(Equal("application/vnd.oci.image.index.v1+json"))

@sudo-bmitch
Copy link
Contributor

This gets into #408, which I'm having a hard time telling if there's a consensus on. Our spec for the header currently says:

The Content-Type header MUST be set to application/vnd.oci.image.index.v1+json.

@northtyphoon
Copy link
Author

Thanks for the clarification. I assume 1.1 spec will stick to MUST?

@sudo-bmitch
Copy link
Contributor

The referrers API was added in 1.1, and these tests are part of the RC for 1.1. So now it's the last chance to sort these things out before it gets released.

@sudo-bmitch sudo-bmitch added this to the v1.1.0 milestone Aug 16, 2023
@northtyphoon
Copy link
Author

We adjusted our implementation to follow the spec “MUST”. Thanks for the clarification again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants