You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/05/27 02:28:42 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 opened a new issue, #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

yhs0092 opened a new issue, #3008:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008

   如题, 当前框架没有做这个转换, 需要业务自己执行.
   有些业务不知道 Invocation Context 在底层实现上是通过 HTTP header 传输的, 可能碰到问题不知道怎么解决. 这里加一个自动编解码功能业务会比较方便, 如果担心兼容性问题可以给这个特性加一个开关.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

Posted by "yhs0092 (via GitHub)" <gi...@apache.org>.
yhs0092 commented on issue #3008:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008#issuecomment-1491383973

   @demonbug @liubao68  感谢两位的帮助, 我看 1.3.8 和 2.7.4 版本开始已经加入对 InvocationContext 的 Jackson encode 功能了.
   不过我发现对应MR的UT代码中存在瑕疵, 另外提了一个issue https://github.com/apache/servicecomb-java-chassis/issues/3739 , 麻烦再看一下, 再次感谢两位! : )


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] demonbug commented on issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

Posted by GitBox <gi...@apache.org>.
demonbug commented on issue #3008:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008#issuecomment-1140641555

   > 这个问题就是兼容性考虑比较复杂。 目前是建议用户设置context之前自行编码,而不是从框架层面编码。 属于历史遗留问题,当然框架层面在最开始设计的时候,考虑URLEncode等,是最好的。
   
   URLEncode会存在兼容性问题,因为上层代码需要进行编解码,而直接使用jackson的unicode编码则没什么兼容性问题,jackson可以自动解码,上层代码不感知


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] yhs0092 closed issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

Posted by "yhs0092 (via GitHub)" <gi...@apache.org>.
yhs0092 closed issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] demonbug commented on issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

Posted by GitBox <gi...@apache.org>.
demonbug commented on issue #3008:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008#issuecomment-1139241096

   JsonUtils可以提供一个支持unicode编码的方法,提供单独的mapper,把JsonWriteFeature.ESCAPE_NON_ASCII开关打开,然后在这儿修改成调用unicode编码的方法
   org.apache.servicecomb.transport.rest.client.http.RestClientInvocation#setCseContext
   
   context转成json的时候自动进行unicode编码,jackson在反序列化时会自动进行解码,业务无感知,理论上不存在兼容性问题


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #3008:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008#issuecomment-1140616353

   这个问题就是兼容性考虑比较复杂。 目前是建议用户设置context之前自行编码,而不是从框架层面编码。 
   属于历史遗留问题,当然框架层面在最开始设计的时候,考虑URLEncode等,是最好的。 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3008: 框架能否在 Invocation Context 设置和读取时自动进行 URL 编解码操作?

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #3008:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3008#issuecomment-1140586878

   1.  新需求建议在2.x提供;
   2. 考虑2.x的兼容性。 2.x的新客户端需要支持调用1.x的老服务;1.x的老客户端需要支持调用2.x的服务端。 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org