-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rocket should show 405 instead of 404 for method not allowed #1224
Comments
From https://tools.ietf.org/html/rfc7231#section-4.1:
I sounds like a good idea to default to 405 instead of 404, then - and applications that want a 404 can add a 405 |
@SergioBenitez does #2616 fix this or do we still need a solution? |
why's this still open? it's been 5 years 😢 |
Hi.
Consider the following route:
now, if you call it with:
it returns:
however, since the passed URL is correct and only the method (verb) is wrong, according to rfc7231#section-6.5.5, it should return
405: Method Not Allowed
with anAllow
header field in a405
response containing a list of the target resource's currently supported methods.So, if you don't agree with that, could you provide a global option to send
405
instead of404
for handlingmethod not allowed
errors?TIA
The text was updated successfully, but these errors were encountered: