f9e732b5 by astaxie

fix param to params

1 parent ae2e25f4
...@@ -581,7 +581,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -581,7 +581,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
581 } 581 }
582 } 582 }
583 583
584 context.Input.Param = params 584 context.Input.Params = params
585 585
586 if runrouter != nil { 586 if runrouter != nil {
587 if r.Method == "POST" { 587 if r.Method == "POST" {
...@@ -766,7 +766,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -766,7 +766,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
766 lastindex := strings.LastIndex(requestPath, "/") 766 lastindex := strings.LastIndex(requestPath, "/")
767 lastsub := requestPath[lastindex+1:] 767 lastsub := requestPath[lastindex+1:]
768 if subindex := strings.LastIndex(lastsub, "."); subindex != -1 { 768 if subindex := strings.LastIndex(lastsub, "."); subindex != -1 {
769 context.Input.Param[":ext"] = lastsub[subindex+1:] 769 context.Input.Params[":ext"] = lastsub[subindex+1:]
770 r.URL.Query().Add(":ext", lastsub[subindex+1:]) 770 r.URL.Query().Add(":ext", lastsub[subindex+1:])
771 r.URL.RawQuery = r.URL.Query().Encode() 771 r.URL.RawQuery = r.URL.Query().Encode()
772 requestPath = requestPath[:len(requestPath)-len(lastsub[subindex:])] 772 requestPath = requestPath[:len(requestPath)-len(lastsub[subindex:])]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!