You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "reta (via GitHub)" <gi...@apache.org> on 2023/03/07 00:17:18 UTC

[GitHub] [cxf] reta opened a new pull request, #1158: CXF-8822: AsyncHTTPConduit removes query-parameters when path is empty

reta opened a new pull request, #1158:
URL: https://github.com/apache/cxf/pull/1158

   AsyncHTTPConduit removes query-parameters when path is empty


-- 
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: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cxf] reta commented on a diff in pull request #1158: CXF-8822: AsyncHTTPConduit removes query-parameters when path is empty

Posted by "reta (via GitHub)" <gi...@apache.org>.
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: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cxf] reta merged pull request #1158: CXF-8822: AsyncHTTPConduit removes query-parameters when path is empty

Posted by "reta (via GitHub)" <gi...@apache.org>.
reta merged PR #1158:
URL: https://github.com/apache/cxf/pull/1158


-- 
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: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org