mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add sys props
This commit is contained in:
@@ -23,7 +23,7 @@ public enum GlobalHeaders {
|
||||
/**
|
||||
* 存储头信息
|
||||
*/
|
||||
Map<String, List<String>> headers = new HashMap<>();
|
||||
final Map<String, List<String>> headers = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 构造
|
||||
@@ -43,6 +43,10 @@ public enum GlobalHeaders {
|
||||
// https://stackoverflow.com/questions/9096987/how-to-overwrite-http-header-host-in-a-httpurlconnection/9098440
|
||||
System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
|
||||
|
||||
//解决server certificate change is restricted during renegotiation问题
|
||||
System.setProperty("jdk.tls.allowUnsafeServerCertChange", "true");
|
||||
System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
|
||||
|
||||
if (isReset) {
|
||||
this.headers.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user