Repository: quarkusio/quarkus
Issue: Query param name containing the '=' character is not correctly encoded by the http client on quarkus reactive

### Describe the bug

Here is a RestClient (take note that we are talking about the encoding of the param name...NOT the param value)

@GET
    @Path("ps")
    public Uni<Map<String, String>> ps(@QueryParam("p1") String p1,
                                       @QueryParam("p2(") String p2,
                                       @QueryParam("p3[") String p3,
                                       @QueryParam("p4?") String p4,
                                       @QueryParam("p5=") String p5,
                                       @QueryParam("p6-") String p6);

the 5th param (p5=) is not sent correctly to the server, as a result the server receives null.
(the other params even if they contain special characters are sent correctly)
NB: this happens ONLY with the reactive libraries.

Check out this repo, it has 2 branches, the master fails and the non_reactive succeeds.
https://github.com/agelbess/quarkus-reactive-query-param-name-with-equals-sign



### Expected behavior

@QueryParam(s) with names that contain the '=' character should be sent with the correct encoding to the server.

### Actual behavior

_No response_

### How to Reproduce?

Clone the repo
https://github.com/agelbess/quarkus-reactive-query-param-name-with-equals-sign
and execute the commands (check the README.md for the same info)

mvn compile quarkus:dev
curl localhost:8080/start

The response will be
responds with {"p1":"1","p2":"2","p3":"3","p4":"4","p5":null,"p6":"6"}

...meaning that the 5th param was not sent correctly to the server.

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.4.0.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/TestBean.java
extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/BasicRestClientTest.java
extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloNonSimpleClient.java
independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java
extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloResource.java

diff --git a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/BasicRestClientTest.java b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/BasicRestClientTest.java
index d9f47a030c0..3148c53acf5 100644
--- a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/BasicRestClientTest.java
+++ b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/BasicRestClientTest.java
@@ -2,6 +2,7 @@
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.util.Map;
 import java.util.Set;
 
 import javax.enterprise.context.ApplicationScoped;
@@ -59,4 +60,16 @@ void shouldHelloBytes() {
     void shouldHelloInts() {
         assertThat(testBean.helloNonSimpleSyncInts()).isEqualTo(new Integer[] { 1, 2, 3 });
     }
+
+    @Test
+    void shouldMapQueryParamsWithSpecialCharacters() {
+        Map<String, String> map = testBean.helloQueryParamsToMap();
+        assertThat(map).size().isEqualTo(6);
+        assertThat(map.get("p1")).isEqualTo("1");
+        assertThat(map.get("p2")).isEqualTo("2");
+        assertThat(map.get("p3")).isEqualTo("3");
+        assertThat(map.get("p4")).isEqualTo("4");
+        assertThat(map.get("p5")).isEqualTo("5");
+        assertThat(map.get("p6")).isEqualTo("6");
+    }
 }
diff --git a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloNonSimpleClient.java b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloNonSimpleClient.java
index d1fc232c0e0..513694dd032 100644
--- a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloNonSimpleClient.java
+++ b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloNonSimpleClient.java
@@ -1,9 +1,13 @@
 package io.quarkus.rest.client.reactive;
 
+import java.util.Map;
+
 import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 
 import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
@@ -38,4 +42,10 @@ public interface HelloNonSimpleClient {
     @Produces(MediaType.APPLICATION_JSON)
     @Path("/ints")
     Uni<Integer[]> echoAsyncInts(Integer[] value);
+
+    @GET
+    @Path("/query-params-to-map")
+    Map<String, String> echoQueryAsMap(@QueryParam("p1") String p1, @QueryParam("p2(") String p2,
+            @QueryParam("p3[") String p3, @QueryParam("p4?") String p4, @QueryParam("p5=") String p5,
+            @QueryParam("p6-") String p6);
 }
diff --git a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloResource.java b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloResource.java
index 8c371f57473..f298c0b3030 100644
--- a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloResource.java
+++ b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/HelloResource.java
@@ -1,12 +1,15 @@
 package io.quarkus.rest.client.reactive;
 
 import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Request;
@@ -39,6 +42,23 @@ public int[] bytes(int[] value) {
         return value;
     }
 
+    @GET
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    @Path("/query-params-to-map")
+    public Map<String, String> queryParamsToMap(@QueryParam("p1") String p1, @QueryParam("p2(") String p2,
+            @QueryParam("p3[") String p3, @QueryParam("p4?") String p4, @QueryParam("p5=") String p5,
+            @QueryParam("p6-") String p6) {
+        Map<String, String> map = new HashMap<>();
+        map.put("p1", p1);
+        map.put("p2", p2);
+        map.put("p3", p3);
+        map.put("p4", p4);
+        map.put("p5", p5);
+        map.put("p6", p6);
+        return map;
+    }
+
     @RestClient
     HelloClient2 client2;
 
diff --git a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/TestBean.java b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/TestBean.java
index 3ae1342adb3..76d37c2e5d6 100644
--- a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/TestBean.java
+++ b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/TestBean.java
@@ -1,6 +1,7 @@
 package io.quarkus.rest.client.reactive;
 
 import java.net.URL;
+import java.util.Map;
 
 import javax.enterprise.context.ApplicationScoped;
 
@@ -42,4 +43,8 @@ byte[] helloNonSimpleSyncBytes() {
     Integer[] helloNonSimpleSyncInts() {
         return clientNonSimple.echoSyncInts(new Integer[] { 1, 2, 3 });
     }
+
+    Map<String, String> helloQueryParamsToMap() {
+        return clientNonSimple.echoQueryAsMap("1", "2", "3", "4", "5", "6");
+    }
 }
diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java
index 577eadfeca6..ba579b9bc3d 100644
--- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java
+++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java
@@ -251,7 +251,7 @@ public RequestOptions apply(ServiceInstance serviceInstance) {
 
         return requestOptions.onItem()
                 .transform(r -> r.setMethod(HttpMethod.valueOf(state.getHttpMethod()))
-                        .setURI(uri.getPath() + (uri.getQuery() == null ? "" : "?" + uri.getQuery()))
+                        .setURI(uri.getPath() + (uri.getRawQuery() == null ? "" : "?" + uri.getRawQuery()))
                         .setFollowRedirects(followRedirects))
                 .onItem().invoke(r -> {
                     if (readTimeout instanceof Long) {