anchor.diff:    if (arguments.length > 0) {
       Conversation.landingPage = arguments[0];
     }
  -  var server = new HttpServer();
     var host = '127.0.0.1';
  -  var port = 8080;
  -  server.listen(host, port);
  -  print('HTTP server started on http://$host:$port/');
  -  server.defaultRequestHandler = Conversation.onRequest;
  +  HttpServer.bind(host, 0).then((HttpServer server) {
  +    print('HTTP server started on http://$host:${server.port}/');
  +    server.listen(Conversation.onRequest, onError: Conversation.onError);
  +  }).catchError((e) {
  +    print("HttpServer.bind error: ${e.error}");
  +    exit(1);
  +  });
   }
  
positive.code:   HttpRequest request;
    HttpResponse response;
  
    static const String LEAP_LANDING_PAGE = 'samples/leap/index.html';
  
    static String landingPage = LEAP_LANDING_PAGE;
  
    Conversation(this.request, this.response);
  
    onClosed() {
      if (response.statusCode == HttpStatus.OK) return;
      print('Request for ${request.path} ${response.statusCode}');
    }
  
    done() {
      response.outputStream.close();
      onClosed();
    }
  
    notFound() {
      response.statusCode = HttpStatus.NOT_FOUND;
      done();
    }
  
  
negative.code:   }
  
    handle() {
      String path = request.uri.path;
      if (path == '/') return redirect('/$landingPage');
      if (path == '/favicon.ico') {
        path = '/sdk/lib/_internal/dartdoc/static/favicon.ico';
      }
      if (path.contains('..') || path.contains('%')) return notFound(path);
      var f = new File("./$path");
      f.exists().then((bool exists) {
        if (!exists) return notFound(path);
        if (path.endsWith('.html')) {
          response.headers.set(CONTENT_TYPE, 'text/html');
        } else if (path.endsWith('.dart')) {
          response.headers.set(CONTENT_TYPE, 'application/dart');
        } else if (path.endsWith('.js')) {
          response.headers.set(CONTENT_TYPE, 'application/javascript');
        } else if (path.endsWith('.ico')) {
          response.headers.set(CONTENT_TYPE, 'image/x-icon');
        }
        setUpErrorHandler();
        f.openRead().pipe(response);
      });
    }
  
    static onRequest(HttpRequest request) {
      new Conversation(request, request.response).handle();
    }
  
    static onError(AsyncError e) {
      if (e.error is HttpParserException) {
        print('Error: ${e.error.message}');
      } else {
        print('Error: ${e.error}');
      }
    }
  
    String htmlInfo(String title, String text) {
      return """
  <!DOCTYPE html>
  <html lang='en'>
  <head>
  <title>$title</title>
  </head>
  <body>
  <h1>$title</h1>
  <p>$text</p>
  </body>
  </html>
  """;
    }
  }
  
  