diff options
-rw-r--r-- | org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java index 6543bf6610..c6e557aba4 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java @@ -89,6 +89,7 @@ import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.config.Registry; import org.apache.http.config.RegistryBuilder; import org.apache.http.conn.socket.ConnectionSocketFactory; +import org.apache.http.conn.socket.PlainConnectionSocketFactory; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.X509HostnameVerifier; import org.apache.http.impl.client.HttpClientBuilder; @@ -157,7 +158,9 @@ public class HttpClientConnection implements HttpConnection { clientBuilder.setSSLSocketFactory(sslConnectionFactory); Registry<ConnectionSocketFactory> registry = RegistryBuilder .<ConnectionSocketFactory> create() - .register("https", sslConnectionFactory).build(); + .register("https", sslConnectionFactory) + .register("http", PlainConnectionSocketFactory.INSTANCE) + .build(); clientBuilder.setConnectionManager( new BasicHttpClientConnectionManager(registry)); } |