mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 05:42:09 +08:00
fix the misplacement of adding slashes
This commit is contained in:
parent
4e7584175d
commit
fc6263371d
2
tree.go
2
tree.go
@ -599,7 +599,7 @@ walk: // Outer loop for walking the tree
|
|||||||
// Nothing found. We can recommend to redirect to the same URL with an
|
// Nothing found. We can recommend to redirect to the same URL with an
|
||||||
// extra trailing slash if a leaf exists for that path
|
// extra trailing slash if a leaf exists for that path
|
||||||
value.tsr = path == "/" ||
|
value.tsr = path == "/" ||
|
||||||
(len(prefix) == len(path)+1 && n.handlers != nil)
|
(len(prefix) == len(path)+1 && path == prefix[:len(prefix) - 1] && n.handlers != nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user