# HG changeset patch # User Emmanuel Gil Peyrot # Date 1310305188 -7200 # Node ID 32f7526da5fe6b19e92063c304acd2a549f73221 # Parent 27eaec05cfd042bc8230ba4aacc98fdd33424def Remove the hardcoded index. diff --git a/avatar.js b/avatar.js --- a/avatar.js +++ b/avatar.js @@ -230,6 +230,11 @@ http.createServer(function (req, res) { }, README: {}, COPYING: {}, + 'index.xhtml': { + re: /\/(index.xhtml)?$/, + mime: 'application/xhtml+xml', + error: '

Index file not available.

' + } }; req.setEncoding('utf-8'); @@ -251,17 +256,6 @@ http.createServer(function (req, res) { var jid = unescape(req.url.replace(new RegExp(config.webRoot), '')); - if (jid === '') { - res.writeHead(200, {'Content-Type': 'application/xhtml+xml'}); - fs.readFile('index.xhtml', function(err, data) { - if (err) - throw err; - - res.end(data); - }); - return; - } - if (jid === 'redirect') { if (req.method !== 'POST') { res.writeHead(404, {'Content-Type': 'text/plain'});