Skip to content

MVC actions returning Problem Details should return the standard media type for Problem Details responses #36560

@DamianEdwards

Description

@DamianEdwards

MVC actions that return the result of calling ControllerBase.ValidationProblem get a response media type of application/validationproblem+json which is not compliant with the RFC7807 spec that they're based on. The media type should be application/problem+json.

We should be using the standard media type. Given this has been the behavior of MVC since the feature was introduced in 2.x, we might want to consider mitigations to address potential compatibility issues, e.g. an option to configure the media type, the ability to set the media type at the time of generating the response, etc.

Metadata

Metadata

Assignees

Labels

old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions