parent
a451f398a3
commit
c280209bf5
2
tree.go
2
tree.go
@ -284,6 +284,8 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
|
|||||||
|
|
||||||
// Match router to runObject & params
|
// Match router to runObject & params
|
||||||
func (t *Tree) Match(pattern string, ctx *context.Context) (runObject interface{}) {
|
func (t *Tree) Match(pattern string, ctx *context.Context) (runObject interface{}) {
|
||||||
|
// fix issue 4961, deal with "./ ../ //"
|
||||||
|
pattern = path.Clean(pattern)
|
||||||
if len(pattern) == 0 || pattern[0] != '/' {
|
if len(pattern) == 0 || pattern[0] != '/' {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user