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;