Permalink
Browse files

Updated the default not found application for router to return the pr…

…oper content length using Buffer.byteLength instead of the strings length method
  • Loading branch information...
1 parent 1ea7e59 commit 15ca46d1432b49ea6697f349553beed3bf3a73b8 @nrstott committed Dec 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bogart.js
View
@@ -241,7 +241,7 @@ exports.router = function(config, notFoundApp) {
return {
status: 404,
body: [body],
- headers: { 'Content-Length': body.length, 'Content-Type': 'text/html' }
+ headers: { 'Content-Length': Buffer.byteLength(body, 'utf-8'), 'Content-Type': 'text/html' }
};
},
router = new Router(config),

0 comments on commit 15ca46d

Please sign in to comment.