diff --git a/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java b/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java index baf7122f3..974d34e5c 100644 --- a/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java +++ b/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java @@ -37,6 +37,7 @@ import org.apache.http.Consts; import org.apache.http.NameValuePair; import org.apache.http.conn.util.InetAddressUtils; import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.TextUtils; /** * Builder for {@link URI} instances. @@ -492,8 +493,8 @@ public class URIBuilder { private static String normalizePath(final String path) { String s = path; - if (s == null) { - return "/"; + if (TextUtils.isBlank(s)) { + return ""; } int n = 0; for (; n < s.length(); n++) {