remove body empty detect

This commit is contained in:
fengmk2 2015-03-29 11:53:54 +08:00
parent 1edd6ec69a
commit 8b14b91bae

View file

@ -204,8 +204,7 @@ function *respond(next) {
if (null == body) { if (null == body) {
this.type = 'text'; this.type = 'text';
body = this.message || String(code); body = this.message || String(code);
/* istanbul ignore else */ this.length = Buffer.byteLength(body);
if (body) this.length = Buffer.byteLength(body);
return res.end(body); return res.end(body);
} }