Closed DamianEdwards closed 3 years ago
I think we should just fix this in .NET 6 given we're just completely out of spec here. We can add an app context switch for back-compat opt-in if we're concerned about it breaking folks.
Cleaning up the milestone so that you can see this during triage. From what I understand you wanted to fix this for RC2. @rafikiassumani-msft
We have a similar issue in Minimal. Working with the team to see if we need to fix this as well for Minimal to be consistent with MVC.
@rafikiassumani-msft see #36557
MVC actions that return the result of calling
ControllerBase.ValidationProblem
get a response media type ofapplication/validationproblem+json
which is not compliant with the RFC7807 spec that they're based on. The media type should beapplication/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.