lfapi

changeset 11:5c6dec2a70a3

Added charset to Content-type header.
author bsw
date Mon Oct 24 21:30:22 2011 +0200 (2011-10-24)
parents ad7255ce00c8
children 63ca0147e776
files lfapi/main.js
line diff
     1.1 --- a/lfapi/main.js	Mon Oct 24 21:27:46 2011 +0200
     1.2 +++ b/lfapi/main.js	Mon Oct 24 21:30:22 2011 +0200
     1.3 @@ -90,10 +90,10 @@
     1.4  
     1.5        if (mode == 'json') {
     1.6          var body = JSON.stringify(object);
     1.7 -        var content_type = 'application/json';
     1.8 +        var content_type = 'application/json; charset=UTF-8';
     1.9          if (req.params && req.params.callback) {
    1.10            body = req.params.callback + '(' + body + ')';
    1.11 -          content_type = 'text/javascript';
    1.12 +          content_type = 'text/javascript; charset=UTF-8';
    1.13          }
    1.14          res.writeHead(
    1.15            http_status, 
    1.16 @@ -111,7 +111,7 @@
    1.17          res.writeHead(
    1.18            http_status, 
    1.19            {
    1.20 -            'Content-Type': 'text/html',
    1.21 +            'Content-Type': 'text/html; charset=UTF-8',
    1.22              'Content-Length': body.length
    1.23            }
    1.24          );

Impressum / About Us