mirror of
https://github.com/labstack/echo.git
synced 2025-07-05 00:58:47 +02:00
Revert "Revert "Fix parameter routes with an extension (/foo/:id.json)""
This reverts commit f526774740
.
This commit is contained in:
@ -68,7 +68,7 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
|
|||||||
j := i + 1
|
j := i + 1
|
||||||
|
|
||||||
r.insert(method, path[:i], nil, skind, "", nil)
|
r.insert(method, path[:i], nil, skind, "", nil)
|
||||||
for ; i < l && path[i] != '/'; i++ {
|
for ; i < l && path[i] != '/' && path[i] != '.'; i++ {
|
||||||
}
|
}
|
||||||
|
|
||||||
pnames = append(pnames, path[j:i])
|
pnames = append(pnames, path[j:i])
|
||||||
|
Reference in New Issue
Block a user