Reputation: 91
I’m chasing an odd pattern matching issue in labstack/echo and would like your thoughts.
Would the route
/first/:parameter/second
match the url
http://hostname/first or http://hostname/first/
?
What about
/first/:parameter1/second/:parameter2/:parameter3/third/
?
To my eye, they should not match the simple urls, but they appear to be. Is that desired behavior? Has anyone followed a parameter with a static in the url pattern?
Upvotes: 0
Views: 1515
Reputation: 2131
In Echo your routes need to be in an order to not match. See the Routing Guide here and look for Path Matching Order
https://echo.labstack.com/guide/routing
Switch around your routes so your /first/:parameter/second
doesn't match /first/:parameter1/second/:parameter2/:parameter3/third/
Upvotes: -1