-
Notifications
You must be signed in to change notification settings - Fork 701
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
Support multiple values for query params #1130
base: master
Are you sure you want to change the base?
Support multiple values for query params #1130
Conversation
fa3b4f3
to
0c3bc1f
Compare
Hi @sanjayatn, thanks for your patch! Could you please add more information about it (comments etc.)? |
And rebase too. |
64ad95e
to
d268fdc
Compare
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #1130 +/- ##
==========================================
- Coverage 78.48% 78.36% -0.12%
==========================================
Files 53 53
Lines 6892 6907 +15
==========================================
+ Hits 5409 5413 +4
- Misses 1483 1494 +11
☔ View full report in Codecov by Sentry. |
Hey @sanjayatn. For commitlint you can find what it's complaining about here. For abidiff my guess is you may have missed this. |
@kiplingw thanks! |
Hi @sanjayatn, thanks for the added description and sorry for the delayed response. I'm personally not a fan of multiple query parameters because, as you say, the behaviour is not standardized, and differences in how different software components handle them can be a source of security vulnerabilities, so much that this class of vulnerabilities got a name: "HTTP parameter pollution". That being said, aligning to what others do is probably fine, as long as the others do sensible stuff. Could you please add a couple of test cases showing this new behaviour? Thanks! |
Support Multiple Values for Query Params.
In the wikipedia article for https://en.wikipedia.org/wiki/Query_string it says "While there is no definitive standard, most web frameworks allow multiple values to be associated with a single field (e.g.
field1=value1&field1=value2&field2=value3
).Many frameworks support this even though it is not the standard. Currently Pistache supports multiple values separated by a comma by default.
This PR adds two enhancements:
,
to allow the rest of the framework to convert values tostd::vector
Query
update method to replace a value in the Query collection.