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 @@ public class URLEncodedUtils {
|
|||
if (safechars.get(b)) {
|
||||
buf.append((char) b);
|
||||
} else {
|
||||
if (b == ' ' && blankAsPlus) {
|
||||
if (blankAsPlus && b == ' ') {
|
||||
buf.append('+');
|
||||
} else {
|
||||
buf.append("%");
|
||||
|
@ -377,7 +377,7 @@ public class URLEncodedUtils {
|
|||
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…
Reference in New Issue