Skip to content

Commit

Permalink
Merge pull request apache#815 from jack15083/develop
Browse files Browse the repository at this point in the history
fix cannot call go provider service when used by java dubbo 2.7.7 version
# Conflicts:
#	registry/base_registry.go
  • Loading branch information
watermelo authored and zouyx committed Oct 31, 2020
1 parent 41ed4d1 commit 1b7fd37
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion registry/base_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,16 @@ func (r *BaseRegistry) providerRegistry(c common.URL, params url.Values, f creat
}
host += ":" + c.Port

rawURL = fmt.Sprintf("%s://%s%s?%s", c.Protocol, host, c.Path, params.Encode())
//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)
Expand Down

0 comments on commit 1b7fd37

Please sign in to comment.