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 2021/05/28 03:44:33 UTC

[GitHub] [servicecomb-java-chassis] NewRomance opened a new issue #2395: 新旧版本的provider-springmvc jar包中的CseHttpMessageConverter类的canRead方法由于返回值不同造成上层服务请求头中的Accept字段值有差异

NewRomance opened a new issue #2395:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2395


   1)基本信息:在服务端接口定义无变化,客户端业务代码无变化的情况下,即同一套代码部署了两套环境(X86和ARM),仅是CSE有无升级(X86未升级,ARM升级)。
   2)差异发现:客户端调用服务端接口,南向请求中请字头里的accept字段由“*/*”(X86,CSE未升级)变成空串“”(ARM,CSE升级)。
   3)定位分析:客户端服务引用的spring-web包无差别(X86和ARM),版本号都是5.1.18。但是经对比发现,升级后CSE的filter(converter -> canReadResponse(this.responseType, converter))会把集合过滤掉,如下图所示:
   ![image](https://user-images.githubusercontent.com/25181274/119926186-76e48c80-bfa9-11eb-8863-72ea370c8bbd.png)
   实现类是provider-springmvc jar包中的CseHttpMessageConverter,(x86,CSE未升级)引用的jar包版本为1.3.0B012,返回的是true,而(arm,CSE升级)引用的jar包版本为2.1.5,返回是false,详情如下:
   ![image](https://user-images.githubusercontent.com/25181274/119926225-882d9900-bfa9-11eb-94dc-ac1ed601c644.png)
   ![image](https://user-images.githubusercontent.com/25181274/119926231-8b288980-bfa9-11eb-90e5-ba08ef189b08.png)
   4)问题:麻烦问下为什么有这样的差异?


-- 
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.

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



[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #2395: 新旧版本的provider-springmvc jar包中的CseHttpMessageConverter类的canRead方法由于返回值不同造成上层服务请求头中的Accept字段值有差异

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #2395:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2395#issuecomment-850796784


   能描述下使用场景和预期结果吗? 这个变化是解决spring版本升级和JDK11不能继续使用反射的问题作出的修改。 


-- 
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.

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2395: 新旧版本的provider-springmvc jar包中的CseHttpMessageConverter类的canRead方法由于返回值不同造成上层服务请求头中的Accept字段值有差异

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


   能描述下使用场景和预期结果吗? 这个变化是解决spring版本升级和不能继续使用反射的问题作出的修改。 


-- 
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.

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



[GitHub] [servicecomb-java-chassis] NewRomance commented on issue #2395: 新旧版本的provider-springmvc jar包中的CseHttpMessageConverter类的canRead方法由于返回值不同造成上层服务请求头中的Accept字段值有差异

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


   我们是通过自动化用例对于服务端接收的客户端请求的校验发现了这个差异,该差异对于我们业务来讲,没有实质影响。目前你们的这个改动在我们这边发现的带来的差异暂时就是这个,我们不是很清楚这个改动对于该jar包其他使用者还有什么影响,你们可以分析和确认下这个改动的影响范围。


-- 
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.

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