-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Description
I use node v12.16.1
and the code below throws me an error: unexpected end of file at BrotliDecoder.zlibOnError [as onerror] (zlib.js:180:17)
var needle = require("needle")
needle("get", 'https://www.cloudflare.com/', {compressed: true}).then((r) => {
console.log(r.headers)
}).catch((e) => {
throw e
})
It works if i comment out this line:
Line 62 in 0ef49f6
flush: zlib.Z_SYNC_FLUSH, |
from:
Lines 60 to 64 in 0ef49f6
// Enable Z_SYNC_FLUSH to avoid Z_BUF_ERROR errors (Node PR #2595) | |
var zlib_options = { | |
flush: zlib.Z_SYNC_FLUSH, | |
finishFlush: zlib.Z_SYNC_FLUSH | |
} |
I couldn't reproduce issues from #202 but the code from above still works on all version mentioned
v5.12.0 (which is the latest v5), v6.9.5 (latest v6), and v7.5.0 (latest v7)
drakedevel
Metadata
Metadata
Assignees
Labels
No labels