Skip to content

Incorrect value of the MediaType.APPLICATION_PROBLEM_JSON_UTF8 #23825

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
jstanik opened this issue Oct 17, 2019 · 2 comments
Closed

Incorrect value of the MediaType.APPLICATION_PROBLEM_JSON_UTF8 #23825

jstanik opened this issue Oct 17, 2019 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: regression A bug that is also a regression
Milestone

Comments

@jstanik
Copy link

jstanik commented Oct 17, 2019

spring-web: 5.2.0
The media type APPLICATION_PROBLEM_JSON_UTF8 has incorrect value application/problem;charset=UTF-8 instead of application/problem+json;charset=UTF-8 missing the +json part.

APPLICATION_PROBLEM_JSON_UTF8 = new MediaType("application", "problem", StandardCharsets.UTF_8);

This causes regression like:

org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class fully.qualified.name.of.our.Exception] with preset Content-Type 'application/problem;charset=UTF-8'
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 17, 2019
@bclozel bclozel self-assigned this Oct 17, 2019
@bclozel bclozel added type: bug A general bug type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on type: bug A general bug labels Oct 17, 2019
@bclozel bclozel added this to the 5.2.1 milestone Oct 17, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x labels Oct 18, 2019
@rstoyanchev
Copy link
Contributor

Seems like a good candidate for 5.1.x. I've added a backport issue.

@jhoeller
Copy link
Contributor

@rstoyanchev This seems to have been a side effect of #22340 in 5.2 only. No need for a backport.

@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) and removed status: backported An issue that has been backported to maintenance branches labels Oct 30, 2019
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) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

5 participants