monkeyWie / proxyee

HTTP proxy server,support HTTPS&websocket.MITM impl,intercept and tamper HTTPS traffic.
MIT License
1.52k stars 567 forks source link

修复gzip和httpContent分段问题 #24

Closed zeroonead closed 6 years ago

zeroonead commented 6 years ago

添加httpContentDecompressor,修复代理启用了gzip压缩的网站时在afterResponse方法获取到的httpContent为压缩之后的数据,不方便修改的问题;添加httpContentCompressor修复客户端请求头包含Accept-Encoding: gzip时若afterResponse返回未经过gzip压缩的数据导致部分客户端异常bug;添加aggegator对httpContent进行聚合,修复一个http请求回调好几次afterResponse方法,每次在afterResponse获取到的httpContent为完整httpContent的部分数据,导致在afterResponse不方便修改返回给客户端的数据问题

monkeyWie commented 6 years ago

这样的话如果响应体大的话,很容易内存溢出的,最好是通过intercept的方式,通过判断响应头来做content的合并

monkeyWie commented 6 years ago

针对你的需求已经添加了一个Intercept https://github.com/monkeyWie/proxyee/commit/7a941ddd90bfa8a83162d2df6325fdd9d350c87f