mirror of
https://github.com/astaxie/beego.git
synced 2025-07-02 13:40:19 +00:00
fix router & tpl tolower
This commit is contained in:
17
router.go
17
router.go
@ -373,14 +373,15 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, route := range p.fixrouters {
|
||||
n := len(requestPath)
|
||||
//route like "/"
|
||||
if n == 1 {
|
||||
if requestPath == route.pattern {
|
||||
runrouter = route
|
||||
findrouter = true
|
||||
break
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
//if n == 1 {
|
||||
// else {
|
||||
// continue
|
||||
// }
|
||||
//}
|
||||
if requestPath == route.pattern {
|
||||
runrouter = route
|
||||
findrouter = true
|
||||
break
|
||||
}
|
||||
|
||||
if (requestPath[n-1] != '/' && route.pattern == requestPath) ||
|
||||
|
Reference in New Issue
Block a user