From dd3dc2d0d073abfdff473ca7f1f43a9e8a87edc3 Mon Sep 17 00:00:00 2001 From: James Yuzawa Date: Thu, 9 Feb 2023 19:25:17 -0500 Subject: [PATCH] Pass URI to Reactor Netty HttpClient See gh-29954 --- .../http/client/reactive/ReactorClientHttpConnector.java | 2 +- .../http/client/reactive/ReactorNetty2ClientHttpConnector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java index 0fdfaab69155..fc87e63a3f96 100644 --- a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java +++ b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java @@ -107,7 +107,7 @@ public Mono connect(HttpMethod method, URI uri, return this.httpClient .request(io.netty.handler.codec.http.HttpMethod.valueOf(method.name())) - .uri(uri.toString()) + .uri(uri) .send((request, outbound) -> requestCallback.apply(adaptRequest(method, uri, request, outbound))) .responseConnection((response, connection) -> { responseRef.set(new ReactorClientHttpResponse(response, connection)); diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorNetty2ClientHttpConnector.java b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorNetty2ClientHttpConnector.java index 1eeece1426fc..8af7cb3d0157 100644 --- a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorNetty2ClientHttpConnector.java +++ b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorNetty2ClientHttpConnector.java @@ -108,7 +108,7 @@ public Mono connect(HttpMethod method, URI uri, return this.httpClient .request(io.netty5.handler.codec.http.HttpMethod.valueOf(method.name())) - .uri(uri.toString()) + .uri(uri) .send((request, outbound) -> requestCallback.apply(adaptRequest(method, uri, request, outbound))) .responseConnection((response, connection) -> { responseRef.set(new ReactorNetty2ClientHttpResponse(response, connection));