1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-17 21:08:05 +02:00

Revert "Revert "Fix parameter routes with an extension (/foo/:id.json)""

This reverts commit f52677474020193ec30fcfc43a1bf07aee599494.
This commit is contained in:
Vishal Rana 2018-04-11 22:34:01 -07:00
parent f526774740
commit a8aaeb8a26

View File

@ -68,7 +68,7 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
j := i + 1
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])