Skip to content

Commit 98f86df

Browse files
mtojekvishr
authored andcommitted
Fix missing multiple params #555 (#558)
1 parent a004403 commit 98f86df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

engine/fasthttp/request.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,12 @@ func (r *Request) FormParams() (params map[string][]string) {
120120

121121
if err == fasthttp.ErrNoMultipartForm {
122122
r.PostArgs().VisitAll(func(k, v []byte) {
123-
// TODO: Filling with only first value
124-
params[string(k)] = []string{string(v)}
123+
key := string(k)
124+
if _, ok := params[key]; ok {
125+
params[key] = append(params[key], string(v))
126+
} else {
127+
params[string(k)] = []string{string(v)}
128+
}
125129
})
126130
} else if err == nil {
127131
for k, v := range mf.Value {

0 commit comments

Comments
 (0)