Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class PercentEscaper extends UnicodeEscaper {
* specified in RFC 3986. Note that some of these characters do need to be escaped when used in
* other parts of the URI.
*/
public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=+";
public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=";

/**
* A string of characters that do not need to be encoded when used in URI Templates reserved
Expand All @@ -72,7 +72,7 @@ public class PercentEscaper extends UnicodeEscaper {
* href="https://www.rfc-editor.org/rfc/rfc6570#section-3.2.3">RFC 6570 - section 3.2.3</a>.
*/
public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER =
SAFEPATHCHARS_URLENCODER + "/?#[]";
SAFEPATHCHARS_URLENCODER + "+/?#[]";

/**
* A string of characters that do not need to be encoded when used in URI user info part, as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testWriteTo() throws IOException {
subtestWriteTo(
"multi=a&multi=b&multi=c", ArrayMap.of("multi", new String[] {"a", "b", "c"}), true);
subtestWriteTo("username=un&password=password123;%7B%7D", params, true);
subtestWriteTo("additionkey=add+tion", ArrayMap.of("additionkey", "add+tion"), true);
subtestWriteTo("additionkey=add%2Btion", ArrayMap.of("additionkey", "add+tion"), true);
}

private void subtestWriteTo(String expected, Object data, boolean useEscapeUriPathEncoding)
Expand Down