Skip to content

Remove charset parameter from Spring MVC JSON content type #22954

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

Closed
sdeleuze opened this issue May 13, 2019 · 0 comments
Closed

Remove charset parameter from Spring MVC JSON content type #22954

sdeleuze opened this issue May 13, 2019 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket)
Milestone

Comments

@sdeleuze
Copy link
Contributor

With #22788, MediaType#APPLICATION_JSON_UTF8 is deprecated an WebFlux default content type for JSON is Content-Type: application/json but based on my tests with Spring MVC it is still Content-Type: application/json;charset=UTF-8. I suspect it is caused by

((ServletServerHttpResponse)outputMessage).getServletResponse().setCharacterEncoding("UTF-8");
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket)
Projects
None yet
Development

No branches or pull requests

1 participant