server/lib/filer-www/default-handler.js
function handleFile(fs, path, res) {
  var contentType = mime.lookup(path);
  var encoding = mime.charsets.lookup(contentType) === "UTF-8" ? "utf8" : null;

  fs.readFile(path, {encoding: encoding}, function(err, data) {
    if(err) {
      log.error(err, 'Unable to read file path `%s`', path);
      handle404(path, res);
      return;
    }

    write(data, contentType, res);
  });
}
function handleFile(fs, path, res) {
  var contentType = mime.lookup(path);
  var encoding = mime.charsets.lookup(contentType) === "UTF-8" ? "utf8" : null;

  fs.readFile(path, {encoding: encoding}, function(err, data) {
    if(err) {
      log.error(err, 'Unable to read file path `%s`', path);
      handle404(path, res);
      return;
    }

    write(data, contentType, res);
  });
}
function handleFile ( fs , path , res ) { var contentType = mime . lookup ( path ) ; var encoding = mime . charsets . lookup ( contentType ) === "UTF-8" ? "utf8" : null ; fs . readFile ( path , { encoding : encoding } , function ( err , data ) { if ( err ) { log . error ( err , 'Unable to read file path `%s`' , path ) ; handle404 ( path , res ) ; return ; } write ( data , contentType , res ) ; } ) ; }
Send the raw file, making it somewhat more readable
Send the raw file making it somewhat more readable