From 9e1293313225481fb21b9f4ea3aeae98833eac20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20K=C3=B6nig?= Date: Sun, 5 Oct 2014 13:21:42 +0200 Subject: [PATCH] Added charset definition to the response 'Content-Type' header (json response). --- lib/rest-handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rest-handler.js b/lib/rest-handler.js index 3185631a..764ca05c 100644 --- a/lib/rest-handler.js +++ b/lib/rest-handler.js @@ -286,7 +286,7 @@ RestHandler.prototype.dataTable = function(req, res) { } RestHandler.prototype.json = function(res, json) { - res.setHeader('content-type', 'application/json') + res.setHeader('content-type', 'application/json; charset=utf-8') res.end(JSON.stringify(json) + '\n') }