diff --git a/lib/application.js b/lib/application.js index 3b3d845..c541f83 100644 --- a/lib/application.js +++ b/lib/application.js @@ -178,7 +178,7 @@ function *respond(next){ // Stream body if (body instanceof Stream) { if (!~body.listeners('error').indexOf(this.onerror)) body.on('error', this.onerror); - if (head) return res.end(); + if (head) return body.close(), res.end(); return body.pipe(res); }