From 6fe4220a8bf6d7f68fd054cf840ca51fcd3f4419 Mon Sep 17 00:00:00 2001 From: Vadim Demedes Date: Thu, 1 Jun 2017 22:04:43 +0300 Subject: [PATCH] fix downloading after decompress PR merging --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 37c5c81a6..c3b02152c 100644 --- a/index.js +++ b/index.js @@ -200,7 +200,7 @@ function requestAsEventEmitter(opts) { const response = opts.decompress === true && typeof decompressResponse === 'function' && - req.method !== 'HEAD' ? decompressResponse(res) : res; + req.method !== 'HEAD' ? decompressResponse(progressStream) : progressStream; if (!opts.decompress && ['gzip', 'deflate'].indexOf(res.headers['content-encoding']) !== -1) { opts.encoding = null;