mirror of
https://github.com/astaxie/beego.git
synced 2025-07-16 02:42:16 +00:00
beego: update the router rule for *
* not match the empty route
This commit is contained in:
6
tree.go
6
tree.go
@@ -267,12 +267,6 @@ func (leaf *leafInfo) match(wildcardValues []string) (ok bool, params map[string
|
||||
}
|
||||
return true, params
|
||||
}
|
||||
if len(leaf.wildcards) == 1 && leaf.wildcards[0] == ":splat" {
|
||||
params = make(map[string]string)
|
||||
params[":splat"] = ""
|
||||
return true, params
|
||||
}
|
||||
Error("bug of router")
|
||||
return false, nil
|
||||
} else if len(wildcardValues) == 0 { // static path
|
||||
return true, nil
|
||||
|
Reference in New Issue
Block a user