Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 15ca46d1432b49ea6697f349553beed3bf3a73b8 1 parent 1ea7e59
@nrstott authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bogart.js
View
2  lib/bogart.js
@@ -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),
Please sign in to comment.
Something went wrong with that request. Please try again.