看看你的请求头Accept-Encoding是不是设置了gzip,deflate
这样的话,返回的response是需要解压缩的
# Content-Encoding: gzip
#Content-Encoding: deflate
if("Content-Encoding" in respInfo):
if("gzip" == respInfo['Content-Encoding']):
respHtml = zlib.decompress(respHtml, 16+zlib.MAX_WBITS);
elif("deflate" == respInfo['Content-Encoding']):
respHtml = zlib.decompress(respHtml, -zlib.MAX_WBITS);