Parser: add workaround for node v0.10.29 regression

Signed-off-by: Brian White <mscdex@mscdex.net>
fork
Brian White 10 years ago
parent cb74e957bd
commit c705211ee4

@ -188,6 +188,7 @@ Parser.prototype._resUntagged = function() {
var which = m[1], size = parseInt(m[2], 10);
this._literallen = size;
this._body = new ReadableStream();
this._body._readableState.sync = false;
this._body._read = EMPTY_READCB;
m = RE_SEQNO.exec(this._buffer);
this._buffer = this._buffer.replace(RE_BODYLITERAL, '');
@ -440,6 +441,7 @@ function parseFetch(text, literals, seqno) {
// a body was sent as a non-literal
val = new Buffer(''+val);
body = new ReadableStream();
body._readableState.sync = false;
body._read = EMPTY_READCB;
this.emit('body', body, {
seqno: seqno,

Loading…
Cancel
Save