1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-01 22:09:21 +02:00

Fix missing multiple params #555 (#558)

This commit is contained in:
Marcin Tojek 2016-06-09 19:20:02 +02:00 committed by Vishal Rana
parent a004403b11
commit 98f86dfc17

View File

@ -120,8 +120,12 @@ func (r *Request) FormParams() (params map[string][]string) {
if err == fasthttp.ErrNoMultipartForm {
r.PostArgs().VisitAll(func(k, v []byte) {
// TODO: Filling with only first value
params[string(k)] = []string{string(v)}
key := string(k)
if _, ok := params[key]; ok {
params[key] = append(params[key], string(v))
} else {
params[string(k)] = []string{string(v)}
}
})
} else if err == nil {
for k, v := range mf.Value {