ReturnHttpNotAcceptable=true Does Not Return ProblemDetails #16889
Labels
affected-very-few
This issue impacts very few customers
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-mvc-execution-pipeline
Features related to how MVC executes a controller or razor page
severity-minor
This label is used by an internal tool
Milestone
Describe the bug
Setting
MvcOptions.ReturnHttpNotAcceptable
totrue
returns a 406 Not Acceptable status code but the body of the response is empty instead of containing aProblemDetails
object.To Reproduce
dotnet new webapi
Startup.ConfigureServices
:curl -i -H "Accept: text/plain" http://localhost:5000/weatherforecast
and note that there is no response body.Further technical details
dotnet --info
Visual Studio 2019 16.4.0
The text was updated successfully, but these errors were encountered: