joyent/node — pull request #1966 by mmalecki (2011-10-29 13:32:41+00:00)
Title: http: `JSON.stringify` objects in OutgoingMessage.write

This allows user to do, for example:

http.createServer(function (req, res) {
res.writeHead(200, {'content-type': 'application/json'});
res.end({ hello: 'world' });
});

Which will end up being outputted as:

{"hello": "world"}

Test included.