1
0
mirror of https://github.com/astaxie/beego.git synced 2025-08-01 00:15:31 +00:00

fix routing bug for splat

This commit is contained in:
chendingxing
2017-03-10 09:28:25 +08:00
parent 323a1c4214
commit 8e46decc8e
2 changed files with 16 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ func init() {
routers = append(routers, testinfo{"/", "/", nil})
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{"/*", "/http://customer/123/", map[string]string{":splat": "http://customer/123/"}})
routers = append(routers, testinfo{"/*", "/customer/2009/12/11", map[string]string{":splat": "customer/2009/12/11"}})
routers = append(routers, testinfo{"/aa/*/bb", "/aa/2009/bb", map[string]string{":splat": "2009"}})
routers = append(routers, testinfo{"/cc/*/dd", "/cc/2009/11/dd", map[string]string{":splat": "2009/11"}})