mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复Http重定全局设置无效问题
This commit is contained in:
@@ -832,7 +832,11 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
||||
* @return this
|
||||
*/
|
||||
public HttpRequest setFollowRedirects(boolean isFollowRedirects) {
|
||||
return setMaxRedirectCount(isFollowRedirects ? 2 : 0);
|
||||
if(isFollowRedirects && config.maxRedirectCount <= 0){
|
||||
// 默认两次跳转
|
||||
return setMaxRedirectCount(2);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user