-
Notifications
You must be signed in to change notification settings - Fork 37
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
Overlapping wildcard and non-wildcard routes cause failing matches #31
Comments
Taking a look at this, your first two failing assertions seem to hit a an edge case where we would have to first backtrack, and restore the tsr state if backtracking fails. It brings me back to wondering whether tsr errors are even worth it over axum's approach (my registering both routes with and without the trailing slash). Your last assertion is a clear bug where backtracking isn't taking place. At first glance seems similar to #12. |
I personally find the trailing slash error weird. I feel that a path should match a route, or not match a route, and that the |
Just released 0.7.2 which contains a partial fix (only covering your last assertion). The cases involving trailing slashes will be fixed as part of #35. |
Trailing slashes are removed as part of 0.8, so this should no longer be an issue. |
Example with matchit 0.7.0, rust 1.69.0:
All of the commented out assertions fail, even though they should match the wildcard route.
The text was updated successfully, but these errors were encountered: