mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 05:16:35 +08:00
Merge 125ccfc6efbd7ff830a5441c0fb6a0fd27790ac0 into 44d0dd70924dd154e3b98bc340accc53484efa9c
This commit is contained in:
commit
ee7761c053
6
tree.go
6
tree.go
@ -351,7 +351,11 @@ func (n *node) insertChild(path string, fullPath string, handlers HandlersChain)
|
||||
}
|
||||
|
||||
if len(n.path) > 0 && n.path[len(n.path)-1] == '/' {
|
||||
pathSeg := strings.SplitN(n.children[0].path, "/", 2)[0]
|
||||
// Wildcard conflict
|
||||
pathSeg := path
|
||||
if len(n.children) != 0 {
|
||||
pathSeg = strings.SplitN(n.children[0].path, "/", 2)[0]
|
||||
}
|
||||
panic("catch-all wildcard '" + path +
|
||||
"' in new path '" + fullPath +
|
||||
"' conflicts with existing path segment '" + pathSeg +
|
||||
|
Loading…
x
Reference in New Issue
Block a user