From a8aaeb8a26cb8b508787b59fa1c7524d18b75f9f Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Wed, 11 Apr 2018 22:34:01 -0700 Subject: [PATCH] Revert "Revert "Fix parameter routes with an extension (/foo/:id.json)"" This reverts commit f52677474020193ec30fcfc43a1bf07aee599494. --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index 0ebdee4e..f654dbd0 100644 --- a/router.go +++ b/router.go @@ -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])