You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2023/11/23 13:09:40 UTC
(httpcomponents-client) branch master updated: Fixes Invalid Proxy exception when using a SSL client without Proxy
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 6d60624cd Fixes Invalid Proxy exception when using a SSL client without Proxy
6d60624cd is described below
commit 6d60624cd3439f81030f7443e72cba21662e5d7b
Author: Cédric Tabin <ce...@sai-erp.net>
AuthorDate: Thu Nov 23 13:20:03 2023 +0100
Fixes Invalid Proxy exception when using a SSL client without Proxy
---
.../java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
index 4e80b4fa7..7ca209cb1 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
@@ -206,7 +206,7 @@ public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactor
@Override
public Socket createSocket(final Proxy proxy, final HttpContext context) throws IOException {
- return new Socket(proxy);
+ return proxy != null ? new Socket(proxy) : new Socket();
}
@Override