reta commented on code in PR #1158:
URL: https://github.com/apache/cxf/pull/1158#discussion_r1127194998


##########
rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java:
##########
@@ -190,9 +190,17 @@ protected void setupConnection(Message message, Address 
address, HTTPClientPolic
             super.setupConnection(message, addressChanged ? new 
Address(uriString, uri) : address, csPolicy);
             return;
         }
+
         if (StringUtils.isEmpty(uri.getPath())) {
-            //hc needs to have the path be "/"
-            uri = uri.resolve("/");
+            try {
+                //hc needs to have the path be "/"
+                uri = new URI(uri.getScheme(),
+                    uri.getUserInfo(), uri.getHost(), uri.getPort(),
+                    uri.resolve("/").getPath(), uri.getQuery(),

Review Comment:
   The `URI::resolve` strips the query path off 



##########
rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java:
##########
@@ -190,9 +190,17 @@ protected void setupConnection(Message message, Address 
address, HTTPClientPolic
             super.setupConnection(message, addressChanged ? new 
Address(uriString, uri) : address, csPolicy);
             return;
         }
+
         if (StringUtils.isEmpty(uri.getPath())) {
-            //hc needs to have the path be "/"
-            uri = uri.resolve("/");
+            try {
+                //hc needs to have the path be "/"
+                uri = new URI(uri.getScheme(),
+                    uri.getUserInfo(), uri.getHost(), uri.getPort(),
+                    uri.resolve("/").getPath(), uri.getQuery(),

Review Comment:
   The `URI::resolve` strips the query string off 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to