Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
00cf7e46
Commit
00cf7e46
authored
Oct 24, 2020
by
fangyincheng
Browse files
Options
Downloads
Patches
Plain Diff
fixed url encode
parent
d8b2beb7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
registry/base_registry.go
+5
-3
5 additions, 3 deletions
registry/base_registry.go
with
5 additions
and
3 deletions
registry/base_registry.go
+
5
−
3
View file @
00cf7e46
...
...
@@ -314,7 +314,7 @@ func (r *BaseRegistry) providerRegistry(c common.URL, params url.Values, f creat
// Dubbo java consumer to start looking for the provider url,because the category does not match,
// the provider will not find, causing the consumer can not start, so we use consumers.
if
len
(
c
.
Methods
)
=
=
0
{
if
len
(
c
.
Methods
)
!
=
0
{
params
.
Add
(
constant
.
METHODS_KEY
,
strings
.
Join
(
c
.
Methods
,
","
))
}
logger
.
Debugf
(
"provider url params:%#v"
,
params
)
...
...
@@ -326,7 +326,8 @@ 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
())
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
)
...
...
@@ -361,7 +362,8 @@ func (r *BaseRegistry) consumerRegistry(c common.URL, params url.Values, f creat
}
params
.
Add
(
"protocol"
,
c
.
Protocol
)
rawURL
=
fmt
.
Sprintf
(
"consumer://%s%s?%s"
,
localIP
,
c
.
Path
,
params
.
Encode
())
s
,
_
:=
url
.
QueryUnescape
(
params
.
Encode
())
rawURL
=
fmt
.
Sprintf
(
"consumer://%s%s?%s"
,
localIP
,
c
.
Path
,
s
)
dubboPath
=
fmt
.
Sprintf
(
"/dubbo/%s/%s"
,
r
.
service
(
c
),
(
common
.
RoleType
(
common
.
CONSUMER
))
.
String
())
logger
.
Debugf
(
"consumer path:%s, url:%s"
,
dubboPath
,
rawURL
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment