Skip to content

Incorrect value of the MediaType.APPLICATION_PROBLEM_JSON_UTF8 #23825

Closed
@jstanik

Description

@jstanik

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'

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions