Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
As diagnosed here, it has been determined that the conditional logic inside the CanWrite
method of Rfc7231ProblemDetailsWriter
should be as follows:
if (acceptHeaderValue.IsSubsetOf(jsonMediaType) ||
acceptHeaderValue.IsSubsetOf(problemDetailsJsonMediaType))
{
return true;
}
This should allow problem details responses to be correctly emitted in the case where the incoming media type is more specific than the known media types, as is the case when an API version is included in the header, e.g. application/json; v=1.0
.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response