From f9e732b5ce6eef7994669c9ed5a8a59ec0381b5b Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 26 Nov 2013 11:16:22 +0800 Subject: [PATCH] fix param to params --- router.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router.go b/router.go index 513a3a86..7300ecb9 100644 --- a/router.go +++ b/router.go @@ -581,7 +581,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) } } - context.Input.Param = params + context.Input.Params = params if runrouter != nil { if r.Method == "POST" { @@ -766,7 +766,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) lastindex := strings.LastIndex(requestPath, "/") lastsub := requestPath[lastindex+1:] if subindex := strings.LastIndex(lastsub, "."); subindex != -1 { - context.Input.Param[":ext"] = lastsub[subindex+1:] + context.Input.Params[":ext"] = lastsub[subindex+1:] r.URL.Query().Add(":ext", lastsub[subindex+1:]) r.URL.RawQuery = r.URL.Query().Encode() requestPath = requestPath[:len(requestPath)-len(lastsub[subindex:])]