examples/node/app.js in faye-0.3.2 vs examples/node/app.js in faye-0.3.3

- old
+ new

@@ -1,9 +1,9 @@ var fs = require('fs'), path = require('path'), sys = require('sys'), - http = require('http') + http = require('http'), faye = require('./faye'); var PUBLIC_DIR = path.dirname(__filename) + '/../shared/public', comet = new faye.NodeAdapter({mount: '/comet', timeout: 45}), @@ -16,11 +16,11 @@ if (comet.call(request, response)) return; var path = (request.url === '/') ? '/index.html' : request.url; fs.readFile(PUBLIC_DIR + path, function(err, content) { - response.sendHeader(200, {'Content-Type': 'text/html'}); + response.writeHead(200, {'Content-Type': 'text/html'}); response.write(content); - response.close(); + response.end(); }); }).listen(Number(port));