incorrect header check when deal with deflate content encoding
See original GitHub issuevar rq = require('request');
rq.get('https://web.wechat.com', {gzip: true});
Error: incorrect header check
at Zlib._handle.onerror (zlib.js:370:17)
While the response from https://web.wechat.com is in deflate format, it show this error. According to PR #2172, request library support deflate content encoding.
After I change responseContent = zlib.createInflate() to responseContent = zlib.createInflateRaw() in request.js, it work fine.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Incorrect Header Check when using zlib in node.js
In our case we added 'accept-encoding': 'gzip,deflate' to the headers and code started working (solution credited to Arul Mani):
Read more >Incorrect header check - Questions - Kong Nation
We noticed that the postman requests contains header: “Accept-Encoding:gzip, deflate” by default. When we override this header with “Accept- ...
Read more >Problem with CONTENT-ENCODING - curl-library@cool.haxx.se
content is compressed with zlib (Content-Encoding: deflate) curl will return "Error while processing content unencoding: incorrect header check".
Read more >Content-Encoding - HTTP - MDN Web Docs
The Content-Encoding representation header lists any encodings that ... This lets the recipient know how to decode the representation in ...
Read more >Chunked With Gzip/Zlib Gives Incorrect Header Check
It seems "incorrect header check" errors in Postman have to do with Zlib compression. Perhaps you are setting gzip Content-Encoding but not actually ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
waiting for fix
Why isn’t the @czardoz branch getting submitted as a PR for merging?