From 23fa6ae77be3a1cca45e7afb409d05ac44367a12 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 21 Dec 2013 02:03:37 +0100 Subject: [PATCH] only files should have a body --- pack.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pack.js b/pack.js index dd504a4..2770781 100644 --- a/pack.js +++ b/pack.js @@ -76,6 +76,11 @@ Pack.prototype.entry = function(header, buffer, callback) { process.nextTick(callback); return; } + if (header.type !== 'file' && header.type !== 'contigious-file') { + this.push(headers.encode(header)); + process.nextTick(callback); + return; + } this.push(headers.encode(header)); this._stream = stream;