activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [2/2] activemq-artemis git commit: [ARTEMIS-1043] Support IPv6 in NettyConnector
Date Fri, 07 Apr 2017 00:57:52 GMT
[ARTEMIS-1043] Support IPv6 in NettyConnector

Call IPV6Util.encloseHost when creating the uri used to send the HTTP
ugrade request to ensure that IPv6 address are properly enclosed.

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1043


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ee50ce40
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ee50ce40
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ee50ce40

Branch: refs/heads/master
Commit: ee50ce404201e8509e51fd88fd98411d7711600f
Parents: c62fdaf
Author: Jeff Mesnil <jmesnil@gmail.com>
Authored: Thu Apr 6 15:30:06 2017 +0200
Committer: Justin Bertram <jbertram@apache.org>
Committed: Thu Apr 6 19:57:21 2017 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/remoting/impl/netty/NettyConnector.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ee50ce40/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
index d31bdb2..ad78908 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
@@ -107,6 +107,7 @@ import org.apache.activemq.artemis.spi.core.remoting.ClientProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
 import org.apache.activemq.artemis.utils.ConfigurationHelper;
 import org.apache.activemq.artemis.utils.FutureLatch;
+import org.apache.activemq.artemis.utils.IPV6Util;
 import org.jboss.logging.Logger;
 
 import static org.apache.activemq.artemis.utils.Base64.encodeBytes;
@@ -686,7 +687,7 @@ public class NettyConnector extends AbstractConnector {
                if (sslEnabled) {
                   scheme = "https";
                }
-               URI uri = new URI(scheme, null, host, port, null, null, null);
+               URI uri = new URI(scheme, null, IPV6Util.encloseHost(host), port, null, null,
null);
                HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
uri.getRawPath());
                request.headers().set(HttpHeaders.Names.HOST, host);
                request.headers().set(HttpHeaders.Names.UPGRADE, ACTIVEMQ_REMOTING);


Mime
View raw message