Wildcard routes swallow later literals #1
Labels
No labels
bug
documentation
enhancement
good first issue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
reviewer/atlas#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Declaring
/files/*pathbefore/files/healthmeans the health route is never reached.Minimal case:
I would expect the more specific pattern to win regardless of order.
Reproduced. The matcher returns the first route that matches at all, so order is load-bearing in a way nothing documents.
Scoring each match by specificity — literals beat parameters, parameters beat wildcards — and taking the highest. Draft on
feature/route-priorities.That reads well. One thought: two routes with the same score should keep declaration order rather than being arbitrary.
Agreed, and that falls out of using a strict
>when comparing. Added a test for it.