cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: [CXF-5781] NettyHttpConduit Port out of Range -1
Date Wed, 04 Jun 2014 19:37:53 GMT
Repository: cxf
Updated Branches:
  refs/heads/master a91277304 -> 4008219f8


[CXF-5781] NettyHttpConduit Port out of Range -1


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4008219f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4008219f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4008219f

Branch: refs/heads/master
Commit: 4008219f8f4052ca1e0a8c904cc89a7dca8032f3
Parents: a912773
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Wed Jun 4 21:37:14 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Wed Jun 4 21:37:32 2014 +0200

----------------------------------------------------------------------
 .../apache/cxf/transport/http/netty/client/NettyHttpConduit.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4008219f/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
index 8cb3c3f..311bf6b 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
@@ -291,7 +291,8 @@ public class NettyHttpConduit extends URLConnectionHTTPConduit implements
BusLif
                 bootstrap.handler(new NettyHttpClientPipelineFactory(null));
             }
             ChannelFuture connFuture = 
-                bootstrap.connect(new InetSocketAddress(url.getHost(), url.getPort()));
+                bootstrap.connect(new InetSocketAddress(url.getHost(), url.getPort() != -1
? url.getPort()
+                                                            : "http".equals(url.getScheme())
? 80 : 443));
 
             // Setup the call back on the NettyHttpClientRequest
             ChannelFutureListener listener = new ChannelFutureListener() {


Mime
View raw message