a851641f by astaxie

update params

1 parent da1fe2fe
...@@ -261,6 +261,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -261,6 +261,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
261 values := r.URL.Query() 261 values := r.URL.Query()
262 for i, match := range matches[1:] { 262 for i, match := range matches[1:] {
263 values.Add(c.params[i], match) 263 values.Add(c.params[i], match)
264 r.Form.Add(c.params[i], match)
264 params[c.params[i]] = match 265 params[c.params[i]] = match
265 } 266 }
266 //reassemble query params and add to RawQuery 267 //reassemble query params and add to RawQuery
...@@ -315,6 +316,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -315,6 +316,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
315 values := r.URL.Query() 316 values := r.URL.Query()
316 for i, match := range matches[1:] { 317 for i, match := range matches[1:] {
317 values.Add(route.params[i], match) 318 values.Add(route.params[i], match)
319 r.Form.Add(route.params[i], match)
318 params[route.params[i]] = match 320 params[route.params[i]] = match
319 } 321 }
320 //reassemble query params and add to RawQuery 322 //reassemble query params and add to RawQuery
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!