Description
Describe the issue
Route Not Found with Constant and Parameter
Vapor version
4.102.0
Operating system and version
macOS 14.5
Swift version
Swift Package Manager - Swift 6.0.0-dev
Steps to reproduce
Imagine routes configured as such:
GET /:provider
GET /google/callback
POST /apple/callback
Where provider
is equal to "google", it will result in a 404 and the route will not be discovered. The google/callback
route prevents the parameterised route from being identified as a viable option. Other values work fine. Notably if the method is different (such as the Apple example) then this will also work fine.
Outcome
I would expect GET /google
to route to GET /:provider
as it matches the pattern. However, it currently returns a 404 and is unable to find a matching route. This is because of the nested 'callback' route with an absolute name.
Notably, if the callback route were to use a parameterised path component then this bug does not happen. (i.e., GET /:provider/callback
works).
Additional notes
No response