Parser: fix bug where _body isn't unset when body bytes left === chunk length

fork
mscdex 11 years ago
parent e99fa094dc
commit bf4c8ca7bf

@ -69,8 +69,6 @@ Parser.prototype._parse = function(data) {
i = this._literallen; i = this._literallen;
this._literallen = 0; this._literallen = 0;
this._body = undefined;
body.push(data.slice(0, litlen)); body.push(data.slice(0, litlen));
} else { } else {
this._literallen -= datalen; this._literallen -= datalen;
@ -82,6 +80,7 @@ Parser.prototype._parse = function(data) {
i = datalen; i = datalen;
} }
if (this._literallen === 0) { if (this._literallen === 0) {
this._body = undefined;
body._read = EMPTY_READCB; body._read = EMPTY_READCB;
body.push(null); body.push(null);
} }

Loading…
Cancel
Save