forwardemail / forwardemail/superagent

'incorrect header check' parsing gzip response on every call but the initial one

Open
#927 14 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I am seeing the following error on every request but the first to a resource (using 1.7.2). It might be related to #410

```
{ [Error: incorrect header check] errno: -3, code: 'Z_DATA_ERROR', response: null } Error: incorrect header check
at Zlib._handle.onerror (zlib.js:363:17)
From previous event:
....
```

The Server resource headers returned (so it supports gzip). The server is a hapi server with default options (version 13)

```
Connection →
Connection
Options that are desired for the connection
keep-alive
Date → Tue, 08 Mar 2016 06:48:58 GMT
Transfer-Encoding → chunked
cache-control → no-cache
content-encoding → gzip
content-type → application/json; charset=utf-8
vary → accept-encoding
```

The resource is being called by a very simple setup:

```
request.get("http://localhost:8963/commands/failed")
.end( (err,res)=>{
if(res.ok)
callback(null, res.body)
else
callback(`ERR: ${res.status} > ${res.text}`)
});
```

Calling the same resource from curl or a browser etc shows no issues.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.