Skip to content
Browse files

correctly determine content-length on response

  • Loading branch information...
1 parent 3092215 commit 6bb95aa2877753a38d6ac54b1878bc891f841739 @cloudhead committed Feb 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/journey.js
View
2 lib/journey.js
@@ -211,7 +211,7 @@ journey.Router.prototype = {
outcome.headers["Content-Type"] = "application/json";
outcome.body = JSON.stringify(outcome.body);
}
- outcome.headers['Content-Length'] = outcome.body.length;
+ outcome.headers['Content-Length'] = Buffer.byteLength(outcome.body);
} else {
delete(outcome.headers["Content-Type"]);
}

0 comments on commit 6bb95aa

Please sign in to comment.
Something went wrong with that request. Please try again.