activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [activemq] branch activemq-5.15.x updated: [AMQ-7476] Add http schema in the HTTP registry
Date Wed, 06 May 2020 05:54:55 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/activemq-5.15.x by this push:
     new 7427a4d  [AMQ-7476] Add http schema in the HTTP registry
7427a4d is described below

commit 7427a4dc8648a44964bc2c522a564711c53508fe
Author: jbonofre <jbonofre@apache.org>
AuthorDate: Tue May 5 07:33:34 2020 +0200

    [AMQ-7476] Add http schema in the HTTP registry
    
    (cherry picked from commit 910a028fa7dd9659044f4e44392197830d9b463e)
---
 .../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);


Mime
View raw message