Permalink
Browse files

Merge pull request #17 from iloire/master

Charset utf-8 encoding
  • Loading branch information...
2 parents 4d0c5ae + a3474ed commit 7bf4edea85f627890205e09f49e9ba48e0d397bf @indexzero indexzero committed Dec 9, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/journey.js
View
4 lib/journey.js
@@ -181,7 +181,7 @@ journey.Router.prototype = {
if (outcome.body) {
if (typeof(outcome.body) !== 'string') {
- outcome.headers["Content-Type"] = "application/json";
+ outcome.headers["Content-Type"] = "application/json;charset=utf-8";
outcome.body = JSON.stringify(outcome.body);
}
outcome.headers['Content-Length'] = Buffer.byteLength(outcome.body);
@@ -365,7 +365,7 @@ journey.Router.prototype = {
baseResponse: {
status: req.method == 'POST' ? 201 : 200,
body: "",
- headers: {"Content-Type" : "application/json"}
+ headers: {"Content-Type" : "application/json;charset=utf-8"}
},
// A wrapper around `respond()`, it allows us to respond in a variety of

0 comments on commit 7bf4ede

Please sign in to comment.