我正在尝试使用 littleproxy-mitm 来检查流量。我可以访问标题并且可以轻松阅读它们。但是,我无法始终如一地找到响应的正文。要查看是否可以通过访问https://www.google.com/humans.txt来获取我正在使用此测试我的应用程序的身体,但找不到想要的身体。但是当我访问 google、facebook 和 twitter 等其他网站时,我似乎得到了胡言乱语(编码的 body gzip most prob),有时是 html。
这是过滤器:
@Override
public HttpObject serverToProxyResponse(HttpObject httpObject) {
if(httpObject instanceof FullHttpResponse){
System.out.println("FullHttpResponse ----------------------------------------");
FullHttpResponse response = (FullHttpResponse) httpObject;
CompositeByteBuf contentBuf = (CompositeByteBuf) response.content();
String contentStr = contentBuf.toString(CharsetUtil.UTF_8);
System.out.println(contentStr);
}
return httpObject;
}
知道为什么我无法从https://www.google.com/humans.txt获取正文吗?