diff --git a/registry/base_registry.go b/registry/base_registry.go index fe61ab173e74575a2c725226c3830c2b65417327..d6f5ceb91b1b46135d2da36418ac69fa71f53d48 100644 --- a/registry/base_registry.go +++ b/registry/base_registry.go @@ -325,8 +325,16 @@ func (r *BaseRegistry) providerRegistry(c common.URL, params url.Values, f creat } host += ":" + c.Port + //delete empty param key + for key, val := range params { + if len(val) > 0 && val[0] == "" { + params.Del(key) + } + } + s, _ := url.QueryUnescape(params.Encode()) rawURL = fmt.Sprintf("%s://%s%s?%s", c.Protocol, host, c.Path, s) + // Print your own registration service providers. dubboPath = fmt.Sprintf("/dubbo/%s/%s", r.service(c), (common.RoleType(common.PROVIDER)).String()) logger.Debugf("provider path:%s, url:%s", dubboPath, rawURL)