You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by as...@apache.org on 2021/07/16 08:33:41 UTC
[incubator-shenyu] branch master updated: fix uri bug (#1786)
This is an automated email from the ASF dual-hosted git repository.
asxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new db56d1d fix uri bug (#1786)
db56d1d is described below
commit db56d1de1b76da17248c44e09bae09ddfb7d3f4a
Author: xiaoyu <xi...@apache.org>
AuthorDate: Fri Jul 16 16:33:18 2021 +0800
fix uri bug (#1786)
---
.../main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java b/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java
index 61e20c2..42323f1 100644
--- a/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java
+++ b/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java
@@ -40,7 +40,6 @@ import reactor.core.publisher.Mono;
import reactor.retry.Backoff;
import reactor.retry.Retry;
-import java.net.URI;
import java.time.Duration;
import java.util.Objects;
import java.util.Optional;
@@ -75,7 +74,7 @@ public class WebClientPlugin implements ShenyuPlugin {
int retryTimes = (int) Optional.ofNullable(exchange.getAttribute(Constants.HTTP_RETRY)).orElse(0);
log.info("The request urlPath is {}, retryTimes is {}", urlPath, retryTimes);
HttpMethod method = HttpMethod.valueOf(exchange.getRequest().getMethodValue());
- WebClient.RequestBodySpec requestBodySpec = webClient.method(method).uri(URI.create(urlPath));
+ WebClient.RequestBodySpec requestBodySpec = webClient.method(method).uri(urlPath);
return handleRequestBody(requestBodySpec, exchange, timeout, retryTimes, chain);
}