fix param to params
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -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:])] | ... | ... |
-
Please register or sign in to post a comment