Browse Source
Merge pull request #11580 from YevhenBondarenko/fix/tb-http-client
Fixed credentials check if simple client factory is used and fixed checks for system proxy properties in TbHttpClient
pull/11484/head
Andrew Shvayka
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
3 deletions
-
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/rest/TbHttpClient.java
|
|
|
@ -122,7 +122,7 @@ public class TbHttpClient { |
|
|
|
SslContext sslContext = config.getCredentials().initSslContext(); |
|
|
|
httpClient = httpClient.secure(t -> t.sslContext(sslContext)); |
|
|
|
} |
|
|
|
} else if (!config.isUseSimpleClientHttpFactory()) { |
|
|
|
} else if (config.isUseSimpleClientHttpFactory()) { |
|
|
|
if (CredentialsType.CERT_PEM == config.getCredentials().getType()) { |
|
|
|
throw new TbNodeException("Simple HTTP Factory does not support CERT PEM credentials!"); |
|
|
|
} |
|
|
|
@ -347,8 +347,7 @@ public class TbHttpClient { |
|
|
|
Properties properties = System.getProperties(); |
|
|
|
if (properties.containsKey(HTTP_PROXY_HOST) || properties.containsKey(HTTPS_PROXY_HOST)) { |
|
|
|
createHttpProxyFrom(option, properties); |
|
|
|
} |
|
|
|
if (properties.containsKey(SOCKS_PROXY_HOST)) { |
|
|
|
} else if (properties.containsKey(SOCKS_PROXY_HOST)) { |
|
|
|
createSocksProxyFrom(option, properties); |
|
|
|
} |
|
|
|
} |
|
|
|
|