Skip to content

fix: keep all values of repeated keys in urlencoded_params_matcher - #829

Open
Shubham-Padkonde wants to merge 1 commit into
getsentry:masterfrom
Shubham-Padkonde:fix/urlencoded-matcher-repeated-keys
Open

Shubham-Padkonde wants to merge 1 commit into
getsentry:masterfrom
Shubham-Padkonde:fix/urlencoded-matcher-repeated-keys

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

The request body was parsed with dict(parse_qsl(...)), so only the last value of a repeated key survived: a request with data={"id": ["1", "2"]} matched urlencoded_params_matcher({"id": "2"}) and could not be matched with a list at all. Repeated keys are now collected into a list.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other

Description

Related Issues

  • Closes #

PR checklist

Before submitting this pull request, I have done the following:

Added/updated tests?

Current repository has 100% test coverage.

  • Yes
  • No, and this is why:
  • I need help with writing tests

The request body was parsed with dict(parse_qsl(...)), so only the last
value of a repeated key survived: a request with data={"id": ["1", "2"]}
matched urlencoded_params_matcher({"id": "2"}) and could not be matched
with a list at all. Repeated keys are now collected into a list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant