提交 ac96c2b1 编写于 作者: L ljyf5593

beego: fix #657

路由地址不区分大小写问题
上级 9c5348f6
...@@ -599,7 +599,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -599,7 +599,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if !findrouter { if !findrouter {
if t, ok := p.routers[r.Method]; ok { if t, ok := p.routers[r.Method]; ok {
runObject, p := t.Match(r.URL.Path) runObject, p := t.Match(strings.ToLower(r.URL.Path))
if r, ok := runObject.(*controllerInfo); ok { if r, ok := runObject.(*controllerInfo); ok {
routerInfo = r routerInfo = r
findrouter = true findrouter = true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册