question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zlib / incorrect header check in vanilla request

See original GitHub issue

My request looks like this:

var req = request
    .get("https://apis.live.net/v5.0/me/contacts")
    .query({
    "access_token": accessToken
}).end(function() { });

Seems to be enough to give this error:

Error: incorrect header check
    at Zlib._binding.onerror (zlib.js:295:17)

When I build the URL myself with a valid access token and point my browser to it, the request succeeds.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
jayceekaycommented, Apr 21, 2016

@defunctzombie i’m still seeing this. newer versions of what? superagent, zlib?

3reactions
djechlincommented, Aug 14, 2013

In browser response headers indicate encoding is deflate. When I add this to my request:

.set({"Accept-Encoding" : "gzip,sdch"})

Request succeeds. So problem seems to be in unencoding deflate-encoded streams. (I guess.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect Header Check when using zlib in node.js
1) Collect all the buffers in an array, and in the end event concatentate them using Buffer.concat() . Then call gunzip on the...
Read more >
'incorrect header check' parsing gzip response on every call ...
I am seeing the following error on every request but the first to a resource ... Zlib / incorrect header check in vanilla...
Read more >
Post by alfsaturn in RPA Extract comments - itch.io
File "encodings\zlib_codec.py", line 43, in zlib_decode zlib.error: Error -3 while decompressing data: incorrect header check [8376] Failed to execute ...
Read more >
3 while decompressing: incorrect header check - zlib.error
PYTHON : zlib.error: Error -3 while decompressing: incorrect header check [ Gift : Animated Search Engine ...
Read more >
zlib.gunzip() on file contents returns Error: incorrect header ...
zlib.error: Error -3 while decompressing: incorrect header check ... zlib.decompress(deflate_data) Traceback (most recent call last): File "<stdin>", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found