anchor.diff:    }
   }
   
  +Future sendError(HttpResponse response, int code, String message) {
  +  return (
  +    response
  +      ..statusCode = code
  +      ..writeln(message)
  +  ).close();
  +}
  +
  +Future send(HttpResponse response, ContentType type, String content) {
  +  return (
  +    response
  +    ..headers.contentType = type
  +    ..writeln(content)
  +  ).close();
  +}
  +
   serveFile(HttpRequest request, HttpResponse response) async {
     var path = request.uri.path;
   
     var mpath = path == "/" ? "." : path.substring(1);
     var type = await FileSystemEntity.type(mpath);
  -  
  +
     if (type == FileSystemEntityType.FILE) {
       var file = new File(mpath);
  -    
  +
       for (var ext in MIMES.keys) {
         if (file.path.endsWith(ext)) {
           response.headers.contentType = ContentType.parse(MIMES[ext]);
  
positive.code:   } else if (type == FileSystemEntityType.DIRECTORY) {
      var query = request.uri.queryParameters;
      var format = query.containsKey("format") ? query["format"].toLowerCase() : "html";
      
      if (format == "html") {
        var list = await generateDirectoryList(request.uri.path);
  
        response
          ..headers.contentType = ContentType.HTML
          ..writeln(list)
          ..close();
      } else if (format == "json") {
        var list = await generateDirectoryListJSON(request.uri.path);
  
        response
          ..headers.contentType = ContentType.JSON
          ..writeln(list)
          ..close();
      } else {
        response
          ..statusCode = 400
          ..writeln("Invalid Response Format: ${format}")
          ..close();
      }
    } else if (type == FileSystemEntityType.NOT_FOUND) {
      response
        ..statusCode = 404
        ..writeln("Not Found")
        ..close();
    } else {
      response
        ..statusCode = 500
        ..writeln("Unknown File System Entity Type")
        ..close();
    }
  }
  
  Future<String> generateDirectoryList(String path) async {
    var relative = path.substring(1);
    var dir = new Directory(relative).absolute;
    
    var children = dir.list();
    var buff = new StringBuffer();
    var out = LISTING;
    
    void addEntry(String entryPath) {
      buff.writeln('<li><a href="${entryPath}">${entryPath}</a></li>');
    }
    
    if (path != "/") {
      addEntry("../");
    }
    
    await for (var child in children) {
      var p = child.path.replaceAll(dir.path, "");
      
      if (child is Directory) {
        p += "/";
      }
      
      addEntry(p);
    }
    
    return out.replaceAll("{path}", path).replaceAll("{files}", buff.toString());
  }
  
  
negative.code: 
    await for (var request in server) {
      print("[Worker ${worker.id}] ${request.method} ${request.uri.path} (${request.connectionInfo.remoteAddress.address})");
  
      await serveFile(request, request.response);
    }
  }
  