提交 dca80788 编写于 作者: B Brian Clozel

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
上级 3e096ce8
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册