Skip to content

Commit a8aaeb8

Browse files
committed
Revert "Revert "Fix parameter routes with an extension (/foo/:id.json)""
This reverts commit f526774.
1 parent f526774 commit a8aaeb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
6868
j := i + 1
6969

7070
r.insert(method, path[:i], nil, skind, "", nil)
71-
for ; i < l && path[i] != '/'; i++ {
71+
for ; i < l && path[i] != '/' && path[i] != '.'; i++ {
7272
}
7373

7474
pnames = append(pnames, path[j:i])

0 commit comments

Comments
 (0)