This is an automated email from the ASF dual-hosted git repository.
zhangzicheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 400fbe1fc [type:bug] fix bug issue #4487. (#4509)
400fbe1fc is described below
commit 400fbe1fc92c4d5c3981f7094f9f950e4298b4b3
Author: yunlongn <[email protected]>
AuthorDate: Wed Mar 29 14:37:33 2023 +0800
[type:bug] fix bug issue #4487. (#4509)
* [type:bug] fix bug issue #4487.
* [type:bug] fix bug issue #4487.
---
.../java/org/apache/shenyu/common/utils/UpstreamCheckUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/shenyu-common/src/main/java/org/apache/shenyu/common/utils/UpstreamCheckUtils.java
b/shenyu-common/src/main/java/org/apache/shenyu/common/utils/UpstreamCheckUtils.java
index 1e6a34b0a..584edc479 100644
---
a/shenyu-common/src/main/java/org/apache/shenyu/common/utils/UpstreamCheckUtils.java
+++
b/shenyu-common/src/main/java/org/apache/shenyu/common/utils/UpstreamCheckUtils.java
@@ -30,9 +30,9 @@ import java.net.Socket;
*/
public class UpstreamCheckUtils {
- private static final String HTTP = "http";
+ private static final String HTTP = "http://";
- private static final String HTTPS = "https";
+ private static final String HTTPS = "https://";
private static final int DEFAULT_TIMEOUT = 3000;
@@ -63,7 +63,7 @@ public class UpstreamCheckUtils {
return false;
}
String[] hostPort;
- if (url.startsWith(HTTP)) {
+ if (url.startsWith(HTTP) || url.startsWith(HTTPS)) {
final String[] http = StringUtils.split(url, "\\/\\/");
hostPort = StringUtils.split(http[1], Constants.COLONS);
} else {