You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/05/05 15:30:12 UTC

[GitHub] [camel-quarkus] zhfeng commented on a diff in pull request #3759: paho: add test case for RFC3986 style urls #3758

zhfeng commented on code in PR #3759:
URL: https://github.com/apache/camel-quarkus/pull/3759#discussion_r866041081


##########
integration-tests/paho/src/main/java/org/apache/camel/quarkus/component/paho/PahoResource.java:
##########
@@ -125,6 +125,21 @@ public String readThenWriteWithFilePersistenceShouldSucceed(@QueryParam("message
                 String.class);
     }
 
+    @Path("/sendReceiveWithRfc3986AuthorityShouldSucceed")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String sendReceiveWithRfc3986AuthorityShouldSucceed(@QueryParam("message") String message) {
+
+        // Change the brokerUrl to an RFC3986 form
+        String tcpUrl = ConfigProvider.getConfig().getValue("paho.broker.tcp.url", String.class);
+        tcpUrl = tcpUrl.replaceAll("tcp://([^:]*):(.*)", "tcp://user:password@$1:$2");

Review Comment:
   OK, that makes sense.



-- 
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: commits-unsubscribe@camel.apache.org

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