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

Superfluous "charset" parameter in JSON content-type #849

Closed
Philonous opened this issue Nov 6, 2017 · 1 comment
Closed

Superfluous "charset" parameter in JSON content-type #849

Philonous opened this issue Nov 6, 2017 · 1 comment

Comments

@Philonous
Copy link
Contributor

7793b52 adds "charset=utf-8" to the content type of json responses, but the parameter isn't defined in the media-type registration. This causes breakage with hspec-wai (hspec/hspec-wai#46)

Related to: #559

@phadej
Copy link
Contributor

phadej commented Nov 6, 2017

I'm sorry, we have ping-ponging this back and forth, and there's always some broken client.
Currently servant-server behaves well, as if asked for just application/json it will response with JSON.

The JSON RFC says on page 10

Note: No "charset" parameter is defined for this registration.
Adding one really has no effect on compliant recipients.

So: hspec-wai should relax its mime-type matching, e.g. by using mainType from http-media.

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