Browse Source

fix isHttp

Looly 5 years ago
parent
commit
e5574fa173
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      hutool-http/src/main/java/cn/hutool/http/HttpUtil.java

+ 1 - 0
CHANGELOG.md

@@ -21,6 +21,7 @@
 * 【core   】     修复Ipv4Util分隔符问题(issue#I24A9I@Gitee)
 * 【core   】     修复Ipv4Util.longToIp的问题
 * 【poi    】     修复Excel07SaxReader读取公式的错误的问题(issue#I23VFL@Gitee)
+* 【http   】     修复HttpUtil.isHttp判断问题(pr#1208@Github)
 
 -------------------------------------------------------------------------------------------------------------
 

+ 1 - 1
hutool-http/src/main/java/cn/hutool/http/HttpUtil.java

@@ -51,7 +51,7 @@ public class HttpUtil {
 	 * @return 是否https
 	 */
 	public static boolean isHttps(String url) {
-		return url.toLowerCase().startsWith("https");
+		return url.toLowerCase().startsWith("https:");
 	}
 
 	/**