mirror of
https://github.com/astaxie/beego.git
synced 2025-07-16 02:32:17 +00:00
fix static pattern match for leaf
This commit is contained in:
2
tree.go
2
tree.go
@@ -389,7 +389,7 @@ type leafInfo struct {
|
||||
func (leaf *leafInfo) match(wildcardValues []string, ctx *context.Context) (ok bool) {
|
||||
//fmt.Println("Leaf:", wildcardValues, leaf.wildcards, leaf.regexps)
|
||||
if leaf.regexps == nil {
|
||||
if len(wildcardValues) == 0 { // static path
|
||||
if len(wildcardValues) == 0 && len(leaf.wildcards) == 0 { // static path
|
||||
return true
|
||||
}
|
||||
// match *
|
||||
|
Reference in New Issue
Block a user