diff --git a/lib/application.js b/lib/application.js index ab5a038..fb766f5 100644 --- a/lib/application.js +++ b/lib/application.js @@ -212,7 +212,7 @@ function respond(next){ // body: json body = JSON.stringify(body, null, this.app.jsonSpaces); - this.set('Content-Length', body.length); + this.set('Content-Length', Buffer.byteLength(body)); this.set('Content-Type', 'application/json'); if (head) return res.end(); res.end(body);