1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-13 21:41:02 +00:00

beego: update the router rule for *

* not match the empty route
This commit is contained in:
astaxie
2014-06-21 11:44:24 +08:00
parent 469f283b68
commit af4f153830
4 changed files with 4 additions and 7 deletions

View File

@ -18,7 +18,6 @@ func init() {
routers = append(routers, testinfo{"/customer/login", "/customer/login", nil})
routers = append(routers, testinfo{"/customer/login", "/customer/login.json", map[string]string{":ext": "json"}})
routers = append(routers, testinfo{"/*", "/customer/123", map[string]string{":splat": "customer/123"}})
routers = append(routers, testinfo{"/customer/*", "/customer", map[string]string{":splat": ""}})
routers = append(routers, testinfo{"/*", "/customer/2009/12/11", map[string]string{":splat": "customer/2009/12/11"}})
routers = append(routers, testinfo{"/*.*", "/nice/api.json", map[string]string{":path": "nice/api", ":ext": "json"}})
routers = append(routers, testinfo{"/:name/*.*", "/nice/api.json", map[string]string{":name": "nice", ":path": "api", ":ext": "json"}})