-
Notifications
You must be signed in to change notification settings - Fork 10.6k
ReturnHttpNotAcceptable=true Does Not Return ProblemDetails #16889
Copy link
Copy link
Open
Labels
affected-very-fewThis issue impacts very few customersThis issue impacts very few customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-mvc-execution-pipelineFeatures related to how MVC executes a controller or razor pageFeatures related to how MVC executes a controller or razor pageseverity-minorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Metadata
Metadata
Assignees
Labels
affected-very-fewThis issue impacts very few customersThis issue impacts very few customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-mvc-execution-pipelineFeatures related to how MVC executes a controller or razor pageFeatures related to how MVC executes a controller or razor pageseverity-minorThis label is used by an internal toolThis label is used by an internal tool
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
Setting
MvcOptions.ReturnHttpNotAcceptabletotruereturns a 406 Not Acceptable status code but the body of the response is empty instead of containing aProblemDetailsobject.To Reproduce
dotnet new webapiStartup.ConfigureServices:curl -i -H "Accept: text/plain" http://localhost:5000/weatherforecastand note that there is no response body.Further technical details
dotnet --infoVisual Studio 2019 16.4.0