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

HttpEntity 使用mof后isStreaming返回有问题 #474

Open
christinkaka opened this issue Jan 9, 2019 · 5 comments
Open

HttpEntity 使用mof后isStreaming返回有问题 #474

christinkaka opened this issue Jan 9, 2019 · 5 comments

Comments

@christinkaka
Copy link

HttpEntity 使用mof后isStreaming返回有问题,应用使用的是org.apache.http包,如果不使用mof 判断isStreaming没问题。貌似mof拦截后,httpentity的实现包都有差异了。请帮忙看看,多谢

@ieven
Copy link
Contributor

ieven commented Jan 9, 2019

方便提供一下您具体的使用过程代码吗(只需说明使用方式即可),我们好进行模拟复现。

@christinkaka
Copy link
Author

通过httpresponse调了一个服务,然后返回使用getentity,获取实体,然后判断实体是否是基于流,使用isstreaming 判断

@ieven
Copy link
Contributor

ieven commented Jan 11, 2019

我这里验证着没有问题。您可以提供一下具体httpclient的版本(同步or异步),具体初始化出来的HttpEntity类型,好帮助我复现一下您的情况,多谢。

@christinkaka
Copy link
Author

加了mof后,接收的返回是bufferedhttpentity的,去掉后是responseentityproxy的

@ieven
Copy link
Contributor

ieven commented Jan 29, 2019

为了能够读取到具体response中的HttpEntity内容,我们会对HttpEntity使用httpclient的HttpEntityWrapper机制对原HttpEntity进行一次套壳处理,就是您看到的BufferedHttpEntity。但是这样做仍然会保留原HttpEntity的特性。如果方便的话您可以直接扫描我们官网的二维码进群,咱们好方便沟通。

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

No branches or pull requests

2 participants