Node.js proxy, dealing with gzip DEcompression

﹥>﹥吖頭↗ 提交于 2019-12-01 00:03:35

The decompressor expects binary encoded input. The chunk that your response receives is an instance of Buffer which toString() method does by default give you an UTF-8 encoded string back.

So you have to use chunk.toString('binary') to make it work, this can also be seen in the demo.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!