Skip to content

fix a bug when the key/value pair is ended with = #248

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

Closed
wants to merge 1 commit into from

Conversation

wangjl1110
Copy link

*Issue #247

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@sapessi sapessi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add unit tests for this in the various frameworks?

@@ -370,7 +370,11 @@ protected String generateQueryString(MultiValuedTreeMap<String, String> paramete
// TODO: Should we concatenate the rest of the values?
if (newValue.getValue() == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are adding checks here. We should also check that kv.length > 0

@@ -370,7 +370,11 @@ protected String generateQueryString(MultiValuedTreeMap<String, String> paramete
// TODO: Should we concatenate the rest of the values?
if (newValue.getValue() == null) {
newValue.setKey(kv[0].trim());
newValue.setValue(kv[1].trim());
if (kv.length == 1) {
newValue.setValue("");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be empty or null? Since the value just wasn't there I would probably opt for null

@sapessi
Copy link
Contributor

sapessi commented Jun 20, 2019

I've implemented the fix with test in the core branch. I'll push it out with the next release

@sapessi sapessi closed this Jun 20, 2019
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.

2 participants