You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
When a user return an ObjectResult with status code other than 200 with no content, the HttpNoContentFormatter overrides the status code provided on the result (and set by the result) and instead returns a 204.
Similarly if the user has explicitly set the StatusCode on the Response we have no way to know it and the formatter will override the user setting.
@Tratcher this keep coming up, it will be really nice to have a way to know if the StatusCode was changed by the user.
The text was updated successfully, but these errors were encountered:
When fixing this ignore the status code on the response, but respect the status code from ObjectResult. The NoContentFormatter should still act and short circuit so no json/XML with null is written
When a user return an
ObjectResult
with status code other than 200 with no content, theHttpNoContentFormatter
overrides the status code provided on the result (and set by the result) and instead returns a 204.Similarly if the user has explicitly set the
StatusCode
on theResponse
we have no way to know it and the formatter will override the user setting.@Tratcher this keep coming up, it will be really nice to have a way to know if the
StatusCode
was changed by the user.The text was updated successfully, but these errors were encountered: