-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[bug] Adding to GET the same endpoint with POST and different Queries ends up with inconsistent error messages #704
Labels
Comments
Ivasan7
changed the title
[bug] Adding the same endpoint POST with different Queries ends up with incosnsistent error messages
[bug] Adding the same endpoint POST with different Queries ends up with inconsistent error messages
Dec 7, 2022
Ivasan7
changed the title
[bug] Adding the same endpoint POST with different Queries ends up with inconsistent error messages
[bug] Adding to GET the same endpoint with POST and different Queries ends up with inconsistent error messages
Dec 7, 2022
soheilrt
added a commit
to soheilrt/mux
that referenced
this issue
Jul 14, 2023
The logical behavour of a router should return http status code of 404 when a request fails to stisfy a route validation logics. Before this, mux was returning 405 http status code in some rare scenarios which is not a valid on its case. For more info, See: gorilla#704 Signed-off-by: Soheil Rahmat <[email protected]>
soheilrt
added a commit
to soheilrt/mux
that referenced
this issue
Jul 14, 2023
The logical behavour of a router should return http status code of 404 when a request fails to stisfy a route validation logics. Before this, mux was returning 405 http status code in some rare scenarios which is not a valid on its case. For more info, See: gorilla#704
coreydaley
added a commit
that referenced
this issue
Aug 17, 2023
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: #704 Fixes #704 **Summary of Changes** 1. Clear the mismatch error of the previous validations on method match. 2. Added related tests > PS: Make sure your PR includes/updates tests! If you need help with this part, just ask! Co-authored-by: Corey Daley <[email protected]>
github-project-automation
bot
moved this from 🏗 In progress
to ✅ Done
in Gorilla Web Toolkit
Aug 17, 2023
This was referenced Dec 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Adding the same endpoint POST with different Queries ends up with incosnsistent error messages
Versions
Go version: 1.18
Steps to Reproduce
Playground: https://go.dev/play/p/xzoAkpEhGgy
ENDS with the result, I was expecting 404:
405
HOWEVER
When I remove the POST request
playground: https://go.dev/play/p/EXiF00_WrFW
Result is
404
Expected behavior
Both cases should end in only 404-s
…
The text was updated successfully, but these errors were encountered: