URL过滤host

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@128 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
william.liangf 2011-10-28 11:02:24 +00:00
parent ecc6579824
commit dc596b13c6
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import java.util.Map;
import java.util.TreeMap;
import com.alibaba.dubbo.common.utils.CollectionUtils;
import com.alibaba.dubbo.common.utils.NetUtils;
/**
* URL - Uniform Resource Locator (Immutable, ThreadSafe)
@ -131,7 +132,7 @@ public final class URL implements Serializable {
this.protocol = protocol;
this.username = username;
this.password = password;
this.host = host;
this.host = NetUtils.filterLocalHost(host);
this.port = (port < 0 ? 0 : port);
this.path = path;
// trim the beginning "/"