diff --git a/index.js b/index.js index 5036935..9ac1546 100644 --- a/index.js +++ b/index.js @@ -64,7 +64,7 @@ module.exports = function(options, onprogress) { tr.setLength = onlength; tr.on('pipe', function(stream) { - if (typeof length === 'number') return; + if (length > 0) return; // Support http module if (stream.readable && !stream.writable && stream.headers) { return onlength(parseInt(stream.headers['content-length'] || 0));