only files should have a body

This commit is contained in:
Mathias Buus 2013-12-21 02:03:37 +01:00
parent 36abc0ac50
commit 23fa6ae77b

View file

@ -76,6 +76,11 @@ Pack.prototype.entry = function(header, buffer, callback) {
process.nextTick(callback); process.nextTick(callback);
return; return;
} }
if (header.type !== 'file' && header.type !== 'contigious-file') {
this.push(headers.encode(header));
process.nextTick(callback);
return;
}
this.push(headers.encode(header)); this.push(headers.encode(header));
this._stream = stream; this._stream = stream;