From bf4c8ca7bf1786e9993616b22fdd039be77f3847 Mon Sep 17 00:00:00 2001 From: mscdex Date: Sun, 30 Jun 2013 22:58:06 -0400 Subject: [PATCH] Parser: fix bug where _body isn't unset when body bytes left === chunk length --- lib/Parser.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Parser.js b/lib/Parser.js index fc2f0f7..ae4f8f4 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -69,8 +69,6 @@ Parser.prototype._parse = function(data) { i = this._literallen; this._literallen = 0; - this._body = undefined; - body.push(data.slice(0, litlen)); } else { this._literallen -= datalen; @@ -82,6 +80,7 @@ Parser.prototype._parse = function(data) { i = datalen; } if (this._literallen === 0) { + this._body = undefined; body._read = EMPTY_READCB; body.push(null); }