cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1379535 - /cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Date Fri, 31 Aug 2012 18:09:11 GMT
Author: dkulp
Date: Fri Aug 31 18:09:11 2012
New Revision: 1379535

URL: http://svn.apache.org/viewvc?rev=1379535&view=rev
Log:
Need to have "/" at the end or hc sends an invalid request

Modified:
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1379535&r1=1379534&r2=1379535&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Fri Aug 31 18:09:11 2012
@@ -33,6 +33,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.common.util.SystemPropertyAction;
 import org.apache.cxf.helpers.HttpHeaderHelper;
 import org.apache.cxf.io.CacheAndWriteOutputStream;
@@ -84,6 +85,7 @@ public class AsyncHTTPConduit extends UR
             super.setupConnection(message, uri, csPolicy);
             return;
         }
+        
         String s = uri.getScheme();
         if (!"http".equals(s) && !"https".equals(s)) {
             throw new MalformedURLException("unknown protocol: " + s);
@@ -106,6 +108,11 @@ public class AsyncHTTPConduit extends UR
             super.setupConnection(message, uri, csPolicy);
             return;
         }
+        if (StringUtils.isEmpty(uri.getPath())) {
+            //hc needs to have the path be "/" 
+            uri = uri.resolve("/");
+        }
+
         message.put(USE_ASYNC, Boolean.TRUE);
         
         String httpRequestMethod = 



Mime
View raw message