mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Fix default origin port in ReactorClientHttpConnector
This commit ensures that a valid port is given to the underlying Netty client when no port is defined in the URL itself. By default, port 80 is used by the Reactor Netty client. Issue: SPR-14477
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ public class ReactorClientHttpConnector implements ClientHttpConnector {
|
||||
public Mono<ClientHttpResponse> connect(HttpMethod method, URI uri,
|
||||
Function<? super ClientHttpRequest, Mono<Void>> requestCallback) {
|
||||
|
||||
return reactor.io.netty.http.HttpClient.create(uri.getHost(), uri.getPort())
|
||||
return reactor.io.netty.http.HttpClient.create(uri.toString())
|
||||
.request(io.netty.handler.codec.http.HttpMethod.valueOf(method.name()),
|
||||
uri.toString(),
|
||||
httpClientRequest -> requestCallback
|
||||
|
||||
Reference in New Issue
Block a user