mux
mux copied to clipboard
[BUG] Inconsistent HTTP status code on query mismatch
The logical behavior of a router should return an HTTP status code of 404 when a request fails to satisfy route validation logic. Previously, MUX was returning a 405 HTTP status code in some rare scenarios, which was not valid in its case.
For more info, See: https://github.com/gorilla/mux/issues/704
Fixes #704
Summary of Changes
- Clear the mismatch error of the previous validations on method match.
- Added related tests
PS: Make sure your PR includes/updates tests! If you need help with this part, just ask!