File tree 4 files changed +8
-5
lines changed
hutool-core/src/main/java/cn/hutool/core/net/url
4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22
22
* 【db 】 修复NamedSql中in没有判断大小写问题(issue#2792@Github)
23
23
* 【core 】 修复ZIP bomb漏洞(issue#2797@Github)
24
24
* 【core 】 修复JSONXMLSerializer将Json转为XML时,遇到嵌套需要递归情况时会丢失contentKeys问题(pr#903@Gitee)
25
- * 【core 】 修复通过jdbcurl创建SimpleDataSource报NullPointException(pr#900@Gitee)
25
+ * 【db 】 修复使用mariadb通过jdbcurl创建SimpleDataSource报NullPointException(pr#900@Gitee)
26
+ * 【core 】 修复UrlBuilder中参数中包括"://"判断错误问题(pr#898@Gitee)
26
27
27
28
-------------------------------------------------------------------------------------------------------------
28
29
Original file line number Diff line number Diff line change 41
41
<br />
42
42
<p align =" center " >
43
43
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=QtsqXLkHpLjE99tkre19j6pjPMhSay1a&jump_from=webapi">
44
- <img src="https://img.shields.io/badge/QQ%E7%BE%A4%E2%91%A5 -715292493-orange"/></a>
44
+ <img src="https://img.shields.io/badge/QQ%E7%BE%A4%E2%91%A6 -715292493-orange"/></a>
45
45
</p >
46
46
47
47
-------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 41
41
<br />
42
42
<p align =" center " >
43
43
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=QtsqXLkHpLjE99tkre19j6pjPMhSay1a&jump_from=webapi">
44
- <img src="https://img.shields.io/badge/QQ%E7%BE%A4%E2%91%A5 -715292493-orange"/></a>
44
+ <img src="https://img.shields.io/badge/QQ%E7%BE%A4%E2%91%A6 -715292493-orange"/></a>
45
45
</p >
46
46
47
47
-------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -108,8 +108,10 @@ public static UrlBuilder ofHttp(String httpUrl) {
108
108
*/
109
109
public static UrlBuilder ofHttp (String httpUrl , Charset charset ) {
110
110
Assert .notBlank (httpUrl , "Http url must be not blank!" );
111
- if (!httpUrl .startsWith ("http://" )&&!httpUrl .startsWith ("https://" )) {
112
- httpUrl = "http://" + httpUrl .trim ();
111
+ httpUrl = StrUtil .trimStart (httpUrl );
112
+ // issue#I66CIR
113
+ if (false == StrUtil .startWithAnyIgnoreCase (httpUrl , "http://" , "https://" )){
114
+ httpUrl = "http://" + httpUrl ;
113
115
}
114
116
return of (httpUrl , charset );
115
117
}
You can’t perform that action at this time.
0 commit comments