1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-26 17:34:13 +00:00

Merge pull request #1207 from oiooj/develop

Don't overwrite the params from function  ValidRouter
This commit is contained in:
astaxie 2015-06-13 09:16:07 +08:00
commit 6b777f0c5e

View File

@ -612,10 +612,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if l, ok := p.filters[pos]; ok {
for _, filterR := range l {
if ok, p := filterR.ValidRouter(urlPath); ok {
for k, v := range context.Input.Params {
p[k] = v
for k, v := range p {
context.Input.Params[k] = v
}
context.Input.Params = p
filterR.filterFunc(context)
if filterR.returnOnOutput && w.started {
return true