1
0
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:
Gavin Fang
2016-03-10 21:59:50 +08:00
parent f45b271b96
commit 90e7d252a7
2 changed files with 16 additions and 1 deletions

View File

@@ -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 *