fix: wrong when wildcard follows named param (#2983)

This commit is contained in:
jincheng9
2021-12-12 13:30:33 +08:00
committed by GitHub
parent e56d18f19d
commit 7d189814cb
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -535,7 +535,7 @@ walk: // Outer loop for walking the tree
// No handle found. Check if a handle for this path + a
// trailing slash exists for TSR recommendation
n = n.children[0]
value.tsr = n.path == "/" && n.handlers != nil
value.tsr = (n.path == "/" && n.handlers != nil) || (n.path == "" && n.indices == "/")
}
return