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

Rest 协议的Dubbo-Attachments格式限制 #4898

Closed
SamPeng87 opened this issue Aug 20, 2019 · 2 comments · Fixed by #4956
Closed

Rest 协议的Dubbo-Attachments格式限制 #4898

SamPeng87 opened this issue Aug 20, 2019 · 2 comments · Fixed by #4956
Milestone

Comments

@SamPeng87
Copy link

SamPeng87 commented Aug 20, 2019

We use Rest protocol more year.

最近我们尝试使用skywalking作为调用跟踪,结果发现rest协议下的Dubbo-Attachments有限制

"The attachments of RpcContext must not contain , or = "

我认为这应该是一个bug。没有考虑传入的Attachments的格式。只是简单的用,和=进行分割。
通常在外部调用可能只是像getAttachments().put("contextData", contextDataStr);这样去调用。DataStr的格式只有在rest的时候才有限制。这是不合理的。

异常抛出在
dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RpcContextFilter.java

是应该修复这个问题吗?

刚和Skywalking的人讨论了一会,认为是协议层不应该有格式上面的限制。

apache/skywalking#3294

@SamPeng87 SamPeng87 changed the title Rest protocol Dubbo-Attachments have format limit Rest 协议的Dubbo-Attachments格式限制 Aug 20, 2019
@wu-sheng
Copy link
Member

SkyWalking header is using BASE64 encoding, w/ leveraging the Dubbo Attachments. Recently we received the feedback about the limit in Dubbo REST.

Would Dubbo team explain why have this limit? And is there any possibility to remove it?

@tswstarplanet
Copy link
Contributor

I think it can be improved, I will submit a pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants