This commit is contained in:
Looly 2022-03-24 22:17:24 +08:00
parent 1b942ac5cd
commit 18741ea8c0

View File

@ -151,7 +151,7 @@ public class HttpRequestTest {
@Test
@Ignore
public void followRedirectsTest(){
public void followRedirectsTest() {
// 从5.7.19开始关闭JDK的自动重定向功能改为手动重定向
// 当有多层重定向时JDK的重定向会失效或者说只有最后一个重定向有效因此改为手动更易控制次数
// 此链接有两次重定向当设置次数为1时表示最多执行一次重定向即请求2次
@ -167,5 +167,4 @@ public class HttpRequestTest {
execute = HttpRequest.get(url).setMaxRedirectCount(1).execute();
Console.log(execute.getStatus(), execute.header(Header.LOCATION));
}
}