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 2020/02/27 02:26:07 UTC

[GitHub] [servicecomb-java-chassis] leonhart opened a new issue #1598: 使用HttpServerFilter拦截请求时无法获取body体内容

leonhart opened a new issue #1598: 使用HttpServerFilter拦截请求时无法获取body体内容
URL: https://github.com/apache/servicecomb-java-chassis/issues/1598
 
 
   sdk版本2.5.0。本地使用postman调用服务api,拦截到的httpServletRequestEX中bodyBuffer内容为空。如果放行到正常的代码逻辑里是正常的。其他人使用相同版本和写法就能正常获取
   ![local](https://user-images.githubusercontent.com/14150277/75406315-1fd9ad00-594b-11ea-88e1-bd512cfd1cf0.jpg)
   
   
   ![other](https://user-images.githubusercontent.com/14150277/75406457-7515be80-594b-11ea-8a44-69e78e65f0f8.jpg)
   
   
   
   
   

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1598: 使用HttpServerFilter拦截请求时无法获取body体内容

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1598: 使用HttpServerFilter拦截请求时无法获取body体内容
URL: https://github.com/apache/servicecomb-java-chassis/issues/1598#issuecomment-591897854
 
 
   可以先看下 httpServletRequestEX 的具体实现类是哪一个, 不同的运行环境这个类的示例不一样, 行为也不一样。 getBodyBuffer 可能为空 。 如果运行于 Servlet 环境, 在实现 HttpServerFilter的时候,注意 'needCacheRequest' 需要返回 true。 

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1598: 使用HttpServerFilter拦截请求时无法获取body体内容

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1598: 使用HttpServerFilter拦截请求时无法获取body体内容
URL: https://github.com/apache/servicecomb-java-chassis/issues/1598#issuecomment-591897854
 
 
   可以先看下 httpServletRequestEX 的具体实现类是哪一个, 不同的运行环境这个类的实例不一样, 行为也不一样。 getBodyBuffer 可能为空 。 如果运行于 Servlet 环境, 在实现 HttpServerFilter的时候,注意 'needCacheRequest' 需要返回 true。 

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


With regards,
Apache Git Services