This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new 910a028  [AMQ-7476] Add http schema in the HTTP registry
     new b01406b  Merge pull request #526 from jbonofre/AMQ-7476
910a028 is described below

commit 910a028fa7dd9659044f4e44392197830d9b463e
Author: jbonofre <[email protected]>
AuthorDate: Tue May 5 07:33:34 2020 +0200

    [AMQ-7476] Add http schema in the HTTP registry
---
 .../java/org/apache/activemq/transport/https/HttpsClientTransport.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java
 
b/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java
index 7ad45c0..d69f227 100644
--- 
a/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java
+++ 
b/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java
@@ -30,6 +30,7 @@ import org.apache.http.config.Registry;
 import org.apache.http.config.RegistryBuilder;
 import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
 import org.apache.http.conn.ssl.DefaultHostnameVerifier;
 import org.apache.http.conn.ssl.NoopHostnameVerifier;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
@@ -61,6 +62,7 @@ public class HttpsClientTransport extends HttpClientTransport 
{
             HostnameVerifier hostnameVerifier = verifyHostName ? new 
DefaultHostnameVerifier() : new NoopHostnameVerifier();
             SSLConnectionSocketFactory sslConnectionFactory = new 
SSLConnectionSocketFactory(sslSocketFactory, hostnameVerifier);
             registryBuilder.register("https", sslConnectionFactory);
+            registryBuilder.register("http", 
PlainConnectionSocketFactory.INSTANCE);
             return registryBuilder.build();
         } catch (Exception e) {
             throw new IllegalStateException("Failure trying to create scheme 
registry", e);

Reply via email to