diff --git a/api.js b/api.js index 2af79919..e13f96e7 100644 --- a/api.js +++ b/api.js @@ -92,9 +92,10 @@ function handleChannelData(params, req, res) { } var response = JSON.stringify(data, null, 4); + var len = unescape(encodeURIComponent(response)).length; res.setHeader("Content-Type", "application/json"); - res.setHeader("Content-Length", response.length); + res.setHeader("Content-Length", len); res.end(response); }