Skip to content

qs@6.14.1 update changes default body-parser behaviour #687

@efekrskl

Description

@efekrskl

Passing arrayLimit as 0 to qs@6.14.1 parses arrays as objects with indexes instead of arrays (lib/types/urlencoded.js:99). Since extended is false by default, our default behaviour has changed.

There's also a failing test

  1) bodyParser.urlencoded()
       with extended option
         when false
           should parse multiple key instances:
     Error: expected '{"user":["Tobi","Loki"]}' response body, got '{"user":{"0":"Tobi","1":"Loki"}}'

Environment information

Version: 2.2.1

Platform:

Node.js version:

Any other relevant information:

What steps will reproduce the bug?

npm run test

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions