mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复Gitee issue #I66CIR
This commit is contained in:
@@ -108,9 +108,7 @@ public final class UrlBuilder implements Builder<String> {
|
||||
*/
|
||||
public static UrlBuilder ofHttp(String httpUrl, Charset charset) {
|
||||
Assert.notBlank(httpUrl, "Http url must be not blank!");
|
||||
|
||||
final int sepIndex = httpUrl.indexOf("://");
|
||||
if (sepIndex < 0) {
|
||||
if (!httpUrl.startsWith("http://")&&!httpUrl.startsWith("https://")) {
|
||||
httpUrl = "http://" + httpUrl.trim();
|
||||
}
|
||||
return of(httpUrl, charset);
|
||||
|
Reference in New Issue
Block a user