Skip to content

Commit

Permalink
fix downloading after decompress PR merging
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Demedes committed Jun 18, 2017
1 parent 9376f2d commit 6fe4220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6fe4220

Please sign in to comment.