-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Wrong route chosen for match any routes on multiple levels #1412
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
Comments
Here are some the benchmarks observed on my system. Before (current master b129098):
With this PR:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There seem to be no interest so far in fixing the router for the wrong any matches... Feedback would be welcome though. |
Looks like this project has been abandoned |
The PR #1413 for this issue went stale and has been auto-closed by the bot without any comments or feedback. Comments for this issue or PR #1413 would be greatly appreciated. |
@vishr Please merge this. We need this ASAP |
@vishr Life Saver! Thanks :) Consider getting more people to help you out. I for one would love to be a maintainer :) |
@asahasrabuddhe I am planning to form a core team to maintain the project, will keep you in mind. |
@vishr Thanks for merging! We are using echo in most of our internal web service projects, so we might step up to as contributer/maintainer if needed (with focus on router and proxy middleware for now). |
Issue Description
For match any routes configured on multiple levels the wrong route seems to be chosen.
It is expected that if a route is not found, that the nearest (longest matching) match any route is chosen.
For the following defined routes
it would be expected for any request under
/api
that can not be resolved to return the match any/api/*
route, even those under/api/user/something
.This is currently handled for static only routes that way.
A PR will be opened to resolve this issue (probably alongside with #1406).
Checklist
Expected behaviour
The route /api/* will be chosen
Actual behaviour
A not found is returned for /api/user/notexists
Steps to reproduce
Run example below.
Working code to debug
Version/commit
Tested with v4.1.10
The text was updated successfully, but these errors were encountered: