fix stream leak on HEAD. Closes #91
This commit is contained in:
parent
f4b7f279ea
commit
f3a6f6ae39
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue