mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
7.0.0.M1
This commit is contained in:
@@ -168,7 +168,7 @@ public class HttpGlobalConfig implements Serializable {
|
||||
|
||||
/**
|
||||
* 是否信任所有Host<br>
|
||||
* 见:https://github.com/dromara/hutool/issues/2042<br>
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/2042<br>
|
||||
*
|
||||
* @param customTrustAnyHost 如果设置为{@code false},则按照JDK默认验证机制,验证目标服务器的证书host和请求host是否一致,{@code true}表示不验证。
|
||||
* @since 5.8.27
|
||||
|
@@ -165,7 +165,7 @@ public class ResponseBody implements HttpBody, Closeable {
|
||||
|
||||
/**
|
||||
* 将响应内容写出到文件-避免未完成的文件
|
||||
* 来自:<a href="https://gitee.com/dromara/hutool/pulls/407">https://gitee.com/dromara/hutool/pulls/407</a><br>
|
||||
* 来自:<a href="https://gitee.com/chinabugotech/hutool/pulls/407">https://gitee.com/chinabugotech/hutool/pulls/407</a><br>
|
||||
* 此方法原理是先在目标文件同级目录下创建临时文件,下载之,等下载完毕后重命名,避免因下载错误导致的文件不完整。
|
||||
*
|
||||
* @param targetFileOrDir 写出到的文件或目录
|
||||
@@ -178,7 +178,7 @@ public class ResponseBody implements HttpBody, Closeable {
|
||||
|
||||
/**
|
||||
* 将响应内容写出到文件-避免未完成的文件
|
||||
* 来自:<a href="https://gitee.com/dromara/hutool/pulls/407">https://gitee.com/dromara/hutool/pulls/407</a><br>
|
||||
* 来自:<a href="https://gitee.com/chinabugotech/hutool/pulls/407">https://gitee.com/chinabugotech/hutool/pulls/407</a><br>
|
||||
* 此方法原理是先在目标文件同级目录下创建临时文件,下载之,等下载完毕后重命名,避免因下载错误导致的文件不完整。
|
||||
*
|
||||
* @param targetFileOrDir 写出到的文件或目录
|
||||
|
@@ -78,7 +78,7 @@ public class UploadTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void smmsTest(){
|
||||
// https://github.com/dromara/hutool/issues/2079
|
||||
// https://github.com/chinabugotech/hutool/issues/2079
|
||||
// hutool的user agent 被封了
|
||||
final String token = "test";
|
||||
final String url = "https://sm.ms/api/v2/upload";
|
||||
|
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 测试上传超时情况<br>
|
||||
* https://gitee.com/dromara/hutool/issues/I6Q30X<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I6Q30X<br>
|
||||
*
|
||||
* post http://localhost:8888/file
|
||||
* form-data: file: file-data
|
||||
|
@@ -222,7 +222,7 @@ public class UserAgentUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/1177
|
||||
* https://github.com/chinabugotech/hutool/issues/1177
|
||||
*/
|
||||
@Test
|
||||
public void parseMicroMessengerTest() {
|
||||
@@ -379,7 +379,7 @@ public class UserAgentUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseEdgATest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4MCBP
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4MCBP
|
||||
final String uaStr = "userAgent: Mozilla/5.0 (Linux; Android 11; MI 9 Transparent Edition) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Mobile Safari/537.36 EdgA/96.0.1054.36";
|
||||
final UserAgent ua = UserAgentUtil.parse(uaStr);
|
||||
assertEquals("MSEdge", ua.getBrowser().toString());
|
||||
@@ -394,7 +394,7 @@ public class UserAgentUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseLenovoTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4QBMD
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4QBMD
|
||||
final String uaStr = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 SLBrowser/7.0.0.6241 SLBChan/30";
|
||||
final UserAgent ua = UserAgentUtil.parse(uaStr);
|
||||
|
||||
@@ -425,7 +425,7 @@ public class UserAgentUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseFromDeepinTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I50YGY
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I50YGY
|
||||
final String uaStr = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36";
|
||||
final UserAgent ua = UserAgentUtil.parse(uaStr);
|
||||
assertEquals("Linux", ua.getOs().toString());
|
||||
@@ -446,7 +446,7 @@ public class UserAgentUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://gitee.com/dromara/hutool/issues/I7OTCU">fix : issues I7OTCU </a>
|
||||
* <a href="https://gitee.com/chinabugotech/hutool/issues/I7OTCU">fix : issues I7OTCU </a>
|
||||
*/
|
||||
@Test
|
||||
public void issuseI7OTCUTest() {
|
||||
|
Reference in New Issue
Block a user