Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parsing multi directurl #78

Merged
merged 1 commit into from
May 27, 2016
Merged

fix parsing multi directurl #78

merged 1 commit into from
May 27, 2016

Conversation

rayzhang0603
Copy link
Collaborator

1、解析directurl时,对refer参数进行urlencode,避免解析url错误。
2、扩展filter时可以不添加Activation注解。

@@ -157,7 +157,7 @@ public synchronized void initRef() {
durl.setHost(hostPort[0].trim());
durl.setPort(Integer.parseInt(hostPort[1].trim()));
durl.addParameter(URLParamType.nodeType.getName(), MotanConstants.NODE_TYPE_SERVICE);
duBuf.append(StringTools.urlDecode(durl.toFullStr())).append(MotanConstants.COMMA_SEPARATOR);
duBuf.append(StringTools.urlEncode(durl.toFullStr())).append(MotanConstants.COMMA_SEPARATOR);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里相当于以前会进行一次decode,现在会进行一次encode,一次decode,是否有可能出现以前正常,更新后少decode一次的情况?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方的encode、decode只在directurl方式下起作用,并且只在localregistry中保存,更新代码后不会出现问题

@qdaxb qdaxb merged commit 70a0a17 into master May 27, 2016
@qdaxb qdaxb deleted the fix/directUrlParse branch June 3, 2016 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants