@@ -24,6 +24,7 @@ public class CommonParams {
24
24
private int connectTimeout ;
25
25
private int readTimeout ;
26
26
private int requestTimeout ;
27
+ private boolean httpsForConfigEnabled ;
27
28
private String path ;
28
29
private String source ;
29
30
private boolean isStorageSource ;
@@ -46,7 +47,6 @@ public class CommonParams {
46
47
private String bucket ;
47
48
private String logFilepath ;
48
49
private Map <String , Map <String , String >> pathConfigMap ;
49
- private List <String > antiDirectories ;
50
50
private List <String > antiPrefixes ;
51
51
private boolean prefixLeft ;
52
52
private boolean prefixRight ;
@@ -164,6 +164,7 @@ public CommonParams(IEntryParam entryParam) throws Exception {
164
164
setTimeout ();
165
165
path = entryParam .getValue ("path" , "" );
166
166
setSource ();
167
+ setHttpsConfigEnabled ();
167
168
accountInit ();
168
169
logFilepath = entryParam .getValue ("log" , null );
169
170
if (isStorageSource ) {
@@ -211,6 +212,7 @@ public CommonParams(Map<String, String> paramsMap) throws Exception {
211
212
this .entryParam = new ParamsConfig (paramsMap );
212
213
setTimeout ();
213
214
source = "terminal" ;
215
+ setHttpsConfigEnabled ();
214
216
accountInit ();
215
217
setParse ();
216
218
setSeparator ();
@@ -384,6 +386,16 @@ else if (!source.matches("(local|qiniu|tencent|aliyun|upyun|s3|huawei|baidu)"))
384
386
isStorageSource = CloudApiUtils .isStorageSource (source );
385
387
}
386
388
389
+ private void setHttpsConfigEnabled () throws IOException {
390
+ String enabled = entryParam .getValue ("config-https" , "" ).trim ();
391
+ if ("" .equals (enabled )) {
392
+ if ("qiniu" .equals (source ) || "huawei" .equals (source )) httpsForConfigEnabled = true ;
393
+ } else {
394
+ ParamsUtils .checked (enabled , "config-https" , "(true|false)" );
395
+ httpsForConfigEnabled = Boolean .parseBoolean (enabled );
396
+ }
397
+ }
398
+
387
399
private void setParse () throws IOException {
388
400
parse = entryParam .getValue ("parse" , "tab" ).trim ();
389
401
ParamsUtils .checked (parse , "parse" , "(csv|tab|json|object|file)" );
@@ -1343,6 +1355,10 @@ public void setRequestTimeout(int requestTimeout) {
1343
1355
this .requestTimeout = requestTimeout ;
1344
1356
}
1345
1357
1358
+ public void setHttpsForConfigEnabled (boolean httpsForConfigEnabled ) {
1359
+ this .httpsForConfigEnabled = httpsForConfigEnabled ;
1360
+ }
1361
+
1346
1362
public void setPath (String path ) {
1347
1363
this .path = path ;
1348
1364
}
@@ -1415,10 +1431,6 @@ public void setPathConfigMap(Map<String, Map<String, String>> pathConfigMap) {
1415
1431
this .pathConfigMap = pathConfigMap ;
1416
1432
}
1417
1433
1418
- public void setAntiDirectories (List <String > antiDirectories ) {
1419
- this .antiDirectories = antiDirectories ;
1420
- }
1421
-
1422
1434
public void setAntiPrefixes (List <String > antiPrefixes ) {
1423
1435
this .antiPrefixes = antiPrefixes ;
1424
1436
}
@@ -1543,6 +1555,10 @@ public int getRequestTimeout() {
1543
1555
return requestTimeout ;
1544
1556
}
1545
1557
1558
+ public boolean isHttpsForConfigEnabled () {
1559
+ return httpsForConfigEnabled ;
1560
+ }
1561
+
1546
1562
public String getPath () {
1547
1563
return path ;
1548
1564
}
@@ -1615,10 +1631,6 @@ public Map<String, Map<String, String>> getPathConfigMap() {
1615
1631
return pathConfigMap ;
1616
1632
}
1617
1633
1618
- public List <String > getAntiDirectories () {
1619
- return antiDirectories ;
1620
- }
1621
-
1622
1634
public List <String > getAntiPrefixes () {
1623
1635
return antiPrefixes ;
1624
1636
}
0 commit comments