-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix HttpMethodValidator produces 404 instead of 405 response #25047
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
Conversation
Hi @vishesh-webkul. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Please see magento/architecture#10 (comment) |
Also, I think this can be considered a breaking change, as HTTP response codes should be considered public API. Though I don't thinks our docs cover it now. But it can potentially break someone. |
https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html |
I think we initially wanted to return 405 but stumbled upon this specification. Also if I'm remembering correctly Varnish would not take 405 response to GET and HEAD requests well so it basically broke page-cache |
I don't think functional tests that are being run during community PR employ varnish and it would be dangerous to merge this. Page-cache bugs are hard to fix and detect |
Also I don't see |
IMO, 405 code makes sense. But according to specs (https://tools.ietf.org/html/rfc7231#section-6.5.5) |
Description (*)
HttpMethodValidator produces 404 instead of 405 response
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)