-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix #1526 trailing slash to any route #1563
Fix #1526 trailing slash to any route #1563
Conversation
…r non-root any route
Codecov Report
@@ Coverage Diff @@
## master #1563 +/- ##
==========================================
+ Coverage 84.85% 84.96% +0.10%
==========================================
Files 28 28
Lines 2166 2168 +2
==========================================
+ Hits 1838 1842 +4
+ Misses 213 211 -2
Partials 115 115
Continue to review full report at Codecov.
|
Benchmarks are showing slight improvements for complex routes (5 to 15% faster) and a slowdown for the ParseAPI routes (around +17%)
WIth this fix:
|
@vishr Comments welcome. A duplicate check for cn.findChildByKind(akind) when the route search is exhausted (search = "") and we need to lookup if a any child is still down the route tree is the cause for the slight performance decrease for some benchmarks. Overall I think it is acceptable as it is. |
…ling slash in request
Update for the benchmarks against current master. Again a little ups and downs. Results for master:
with the latest commits of this PR:
|
Thanks you for this fix @lammel 🙏, i've had the same issue with echo |
This PR fixes #1526 to handle a corner case for a request with trailing slash that shall match an any route just below the request path.
GET /users/
will now correctly match the any route/users/*