mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
HTTPCLIENT-1195: minor optimization
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1353678 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3d3457f458
commit
158ca6f4a0
@ -332,7 +332,7 @@ private static String urlencode(
|
||||
if (safechars.get(b)) {
|
||||
buf.append((char) b);
|
||||
} else {
|
||||
if (b == ' ' && blankAsPlus) {
|
||||
if (blankAsPlus && b == ' ') {
|
||||
buf.append('+');
|
||||
} else {
|
||||
buf.append("%");
|
||||
@ -377,7 +377,7 @@ private static String urldecode(
|
||||
bb.put((byte) uc);
|
||||
bb.put((byte) lc);
|
||||
}
|
||||
} else if (c == '+' && plusAsBlank) {
|
||||
} else if (plusAsBlank && c == '+') {
|
||||
bb.put((byte) ' ');
|
||||
} else {
|
||||
bb.put((byte) c);
|
||||
|
Loading…
x
Reference in New Issue
Block a user