-
Notifications
You must be signed in to change notification settings - Fork 233
spec: fix binary JSON content-type #41
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
Conversation
This fixes endpoints examples to return the proper `application/json` content-type for JSON content. As per IETF specification and IANA registry below, the `application/json` type is a binary media, so the content-type label does not need any text-charset selector. Additionally, the media type definition explicitly states that it has no required nor optional parameters, which makes the current registry headers non-compliant. Ref: https://www.iana.org/assignments/media-types/application/json Signed-off-by: Luca Bruno <luca.bruno@coreos.com>
|
This originally comes from distribution/distribution#2813, and tries to solve the ambiguity of a non-standard content-type which was the root cause of this k8s+containerd+quay regression kubernetes/kubernetes#72863 (comment). |
|
This should probably be cross posted, but here we go: The details of the regression was that Quay added I do agree that we should remove it, if we're confident it won't break existing clients. |
|
I think most of the code that checks for the charset was written by you, @stevvooe. So if you think it's fine, I'll rubber stamp it. My experience with working with http headers in Go is that nothing in net/http helps you with the values pulled out of headers (e.g. splitting on |
|
Bump, does this need more green-stamps or can it be merged already? |
This fixes endpoints examples to return the proper
application/jsoncontent-type for JSON content.
As per IETF specification and IANA registry below, the
application/jsontype is a binary media, so the content-type label does not need any
text-charset selector. Additionally, the media type definition
explicitly states that it has no required nor optional parameters,
which makes the current registry headers non-compliant.
Ref: https://www.iana.org/assignments/media-types/application/json
Signed-off-by: Luca Bruno luca.bruno@coreos.com