提交 082c0dcc 编写于 作者: N Nikita Koksharov

Fixed - host details in Redis url cause extra bracket at the end. #2370

上级 2e6de2ee
......@@ -38,6 +38,9 @@ public class RedisURI {
String urlHost = uri.replaceFirst("redis://", "http://").replaceFirst("rediss://", "http://");
String ipV6Host = uri.substring(uri.indexOf("://")+3, uri.lastIndexOf(":"));
if (ipV6Host.contains("@")) {
ipV6Host = ipV6Host.split("@")[1];
}
if (ipV6Host.contains(":")) {
urlHost = urlHost.replace(ipV6Host, "[" + ipV6Host + "]");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册