-
Notifications
You must be signed in to change notification settings - Fork 38
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
content-type with "+ convention" #172
Comments
That would also be more in line with RFC 7807's |
Yes. I've intentionally not registered the media type because I want the flexibility to change the format when it's more baked. |
as one additional data point: https://tools.ietf.org/html/draft-wilde-home-xml-03#section-4.1 defines |
Seems like it's time to turn this convention into an officially meaningful thing. |
@RubenVerborgh: it is an RFC (https://tools.ietf.org/html/rfc6838), but media types are free to follow or ignore this pattern. |
Some formats that look like they might be JSON, based on the media-type in the content-type header are not actually valid JSON. This presents problems with tests trying to decode, but being unable to do so, causing unexpected failures. These changes update the accepts method in the JSONHandler to be more specific and adds tests to cover it. As part of this some test which showed that we accept "application/json-home" as valid JSON have been removed. That media type is not considered legitimate. See: mnot/I-D#172 Note that this change is an improvement, but it is not 100% reliable as there is no good way to be so because the world is complex and ambiguous, which is part of why #301 was done: to deal with gaps. Thanks to @FND for ideas from #298. Fixes #296
Some formats that look like they might be JSON, based on the media-type in the content-type header are not actually valid JSON. This presents problems with tests trying to decode, but being unable to do so, causing unexpected failures. These changes update the accepts method in the JSONHandler to be more specific and adds tests to cover it. As part of this some test which showed that we accept "application/json-home" as valid JSON have been removed. That media type is not considered legitimate. See: mnot/I-D#172 Note that this change is an improvement, but it is not 100% reliable as there is no good way to be so because the world is complex and ambiguous, which is part of why #301 was done: to deal with gaps. This change was driven by needing to not match 'application/json;stream=<some value>'. This is based on what Kubernetes does for watch requests, streaming json objects over chunks. Thanks to @FND for ideas from #298. Fixes #296
I would have expected
application/home+json
in line with the "+ convention".The text was updated successfully, but these errors were encountered: