Permalink
Browse files

Merge branch 'master' of github.com:creationix/node-router

  • Loading branch information...
2 parents cab031f + f7f180e commit 6c2289a0fa6d823e8b1525758b1c6515792a61c5 @creationix committed Apr 10, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/node-router.js
View
@@ -31,7 +31,7 @@ var url_parse = require("url").parse;
// Used as a simple, convient 404 handler.
function notFound(req, res, message) {
- message = message || "Not Found\n";
+ message = (message || "Not Found\n") + "";
res.writeHead(404, {
"Content-Type": "text/plain",
"Content-Length": message.length
@@ -49,7 +49,7 @@ function logify(req, res, logger) {
logger((req.socket && req.socket.remoteAddress) + " - - [" + (new Date()).toUTCString() + "]"
+ " \"" + req.method + " " + req.url
+ " HTTP/" + req.httpVersionMajor + "." + req.httpVersionMinor + "\" "
- + res.statusCode + " " + res.output[0].length + " \""
+ + res.statusCode + " - \""
+ (req.headers['referrer'] || "") + "\" \"" + req.headers["user-agent"].split(' ')[0] + "\"");
return end.apply(this, arguments);
}
@@ -506,6 +506,7 @@ var mime = exports.mime = {
".tiff" : "image/tiff",
".torrent" : "application/x-bittorrent",
".tr" : "text/troff",
+ ".ttf" : "application/x-font-ttf",
".txt" : "text/plain",
".vcf" : "text/x-vcard",
".vcs" : "text/x-vcalendar",

0 comments on commit 6c2289a

Please sign in to comment.