diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d4b036c8..5fce32081 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,8 @@ * 【db 】 修复NamedSql中in没有判断大小写问题(issue#2792@Github) * 【core 】 修复ZIP bomb漏洞(issue#2797@Github) * 【core 】 修复JSONXMLSerializer将Json转为XML时,遇到嵌套需要递归情况时会丢失contentKeys问题(pr#903@Gitee) -* 【core 】 修复通过jdbcurl创建SimpleDataSource报NullPointException(pr#900@Gitee) +* 【db 】 修复使用mariadb通过jdbcurl创建SimpleDataSource报NullPointException(pr#900@Gitee) +* 【core 】 修复UrlBuilder中参数中包括"://"判断错误问题(pr#898@Gitee) ------------------------------------------------------------------------------------------------------------- diff --git a/README-EN.md b/README-EN.md index 62d3e6089..d78d8a49c 100755 --- a/README-EN.md +++ b/README-EN.md @@ -41,7 +41,7 @@

- +

------------------------------------------------------------------------------- diff --git a/README.md b/README.md index a7e03e06c..f52458567 100755 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@

- +

------------------------------------------------------------------------------- diff --git a/hutool-core/src/main/java/cn/hutool/core/net/url/UrlBuilder.java b/hutool-core/src/main/java/cn/hutool/core/net/url/UrlBuilder.java index 82445416a..018019987 100755 --- a/hutool-core/src/main/java/cn/hutool/core/net/url/UrlBuilder.java +++ b/hutool-core/src/main/java/cn/hutool/core/net/url/UrlBuilder.java @@ -108,8 +108,10 @@ public final class UrlBuilder implements Builder { */ public static UrlBuilder ofHttp(String httpUrl, Charset charset) { Assert.notBlank(httpUrl, "Http url must be not blank!"); - if (!httpUrl.startsWith("http://")&&!httpUrl.startsWith("https://")) { - httpUrl = "http://" + httpUrl.trim(); + httpUrl = StrUtil.trimStart(httpUrl); + // issue#I66CIR + if(false == StrUtil.startWithAnyIgnoreCase(httpUrl, "http://", "https://")){ + httpUrl = "http://" + httpUrl; } return of(httpUrl, charset); }