Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Reopened Issue: Currently if a HTTP method is not supported Web API returns a 404 instead of a 405 when there are actions for other supported methods [274]

$
0
0
In the current version of Web API, when the action selector does not find a matching action for a HTTP method it returns a 404 status code even when the resource URI supports other methods (e.g. it supports GET and POST but not DELETE, PUT, etc.)

Based on the HTTP spec, this is not the correct behaviour as a 404 means that "The server has not found anything matching the Request-URI". In this case, there is a resource at the Request-URI as an operation with a supported verb succeeds so a Not Found status code is misleading and incorrect. Instead, it should return a 405 status code which means "The method specified in the Request-Line is not allowed for the resource identified by the Request-URI". This is correct as only the particular method is not supported.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>