refactor: allow any streams with .pipe method

This commit is contained in:
Jonathan Ong 2013-12-19 21:14:44 -08:00
parent f061d1f8a9
commit 34104c9af3
2 changed files with 2 additions and 2 deletions

View file

@ -215,7 +215,7 @@ function *respond(next){
} }
// Stream body // Stream body
if (body instanceof Stream) { if ('function' == typeof body.pipe) {
if (!~body.listeners('error').indexOf(this.onerror)) body.on('error', this.onerror); if (!~body.listeners('error').indexOf(this.onerror)) body.on('error', this.onerror);
if (head) { if (head) {

View file

@ -133,7 +133,7 @@ module.exports = {
} }
// stream // stream
if (val instanceof Stream) { if ('function' == typeof val.pipe) {
if (setType) this.type = 'bin'; if (setType) this.type = 'bin';
return; return;
} }