From 491238ce7d698f7a0ab65b8d820edb11339bcd3f Mon Sep 17 00:00:00 2001 From: "MrLee.Kun" Date: Sat, 13 Jun 2015 01:04:46 +0800 Subject: [PATCH] Don't overwrite the params from function ValidRouter just add new params to context.Input.Params --- router.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/router.go b/router.go index 8afb9ee2..4d195bc8 100644 --- a/router.go +++ b/router.go @@ -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