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 the plus decoding in ArmeriaHttpUtil #5927

Closed
wants to merge 1 commit into from

Conversation

yzfeng2020
Copy link
Contributor

Motivation:

Explain why you're making this change and what problem you're trying to solve.

Modifications:

  • List the modifications you've made in detail.

Result:

  • Closes #. (If this resolves the issue.)
  • Describe the consequences that a user will face after this PR is merged.

@@ -116,6 +116,12 @@ void testDecodePath(boolean isPathParam) throws Exception {
} else {
assertThat(decodeFunc.apply("/%2F")).isEqualTo("/%2F");
}

// Tests for '+' decoding into ' '
assertThat(decodeFunc.apply("/foo+bar")).isEqualTo("/foo bar"); // '+' should be decoded into space
Copy link
Member

Choose a reason for hiding this comment

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

  • should be decoded only when it's used as a part of a query string. /foo+bar stays same while /foo?bar+baz is decoded into /foo?bar baz.

@yzfeng2020 yzfeng2020 closed this Oct 2, 2024
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