cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: [CXF-5791] Could not send a message. Caused by HTTP response '404: Not Found'; patch by Guilherme
Date Wed, 11 Jun 2014 10:50:13 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 293220128 -> 5885d6be3


[CXF-5791] Could not send a message. Caused by HTTP response '404: Not Found'; patch by Guilherme


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

Branch: refs/heads/master
Commit: 5885d6be3fdb3b9b38a4d9d753e927424f20096c
Parents: 2932201
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Wed Jun 11 12:49:24 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Wed Jun 11 12:49:55 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/5885d6be/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientRequest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientRequest.java
b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientRequest.java
index 2b377bb..727f98f 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientRequest.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientRequest.java
@@ -50,7 +50,8 @@ public class NettyHttpClientRequest {
                                        uri.getPath().toString(), content);
         // setup the default headers
         request.headers().set("Connection", "keep-alive");
-        request.headers().set("Host", uri.getHost() + ":" + uri.getPort());
+        request.headers().set("Host", uri.getHost() + ":"
+            + (uri.getPort() != -1 ? uri.getPort() : "http".equals(uri.getScheme()) ? 80
: 443));
     }
 
     public HttpRequest getRequest() {


Mime
View raw message