Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of empty query string pairs better #501

Merged
merged 1 commit into from
Feb 16, 2015
Merged

Fix parsing of empty query string pairs better #501

merged 1 commit into from
Feb 16, 2015

Conversation

ap
Copy link
Contributor

@ap ap commented Feb 16, 2015

This changes the test to include empty pairs both at the start and in the middle of the string.

Also it avoids the check for empty pairs in every iteration of the map by splitting not just on single separators, but on sequences of any number of separators – then the split doesn’t produce empty pairs in the first place. The remaining exception is that it can still do so at the start of the string, so the code first throws away any sequence of leading separators.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 82.06% when pulling b89569c on ap:fix-empty-querystring-pairs-better into 360b46e on plack:master.

miyagawa added a commit that referenced this pull request Feb 16, 2015
Fix parsing of empty query string pairs better
@miyagawa miyagawa merged commit 8784748 into plack:master Feb 16, 2015
@ap ap deleted the fix-empty-querystring-pairs-better branch April 19, 2015 20:29
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.

None yet

3 participants