From 679d685fd9eb1ff44f3c483ff577661f0ffe432d Mon Sep 17 00:00:00 2001 From: mscdex Date: Sat, 29 Jun 2013 02:05:52 -0400 Subject: [PATCH] Parser: wrap passed in stream for node v0.8 --- lib/Parser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Parser.js b/lib/Parser.js index da9fb25..5f19ef0 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -25,6 +25,9 @@ function Parser(stream, debug) { EventEmitter.call(this); + if (/^v0\.8\./.test(process.version)) + stream = new ReadableStream().wrap(stream); + this._stream = stream; this._body = undefined; this._literallen = 0;