| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library http_server; | 5 library http_server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'test_suite.dart'; // For TestUtils. | 9 import 'test_suite.dart'; // For TestUtils. |
| 10 // TODO(efortuna): Rewrite to not use the args library and simply take an | 10 // TODO(efortuna): Rewrite to not use the args library and simply take an |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 response.statusCode = HttpStatus.NOT_FOUND; | 380 response.statusCode = HttpStatus.NOT_FOUND; |
| 381 response.close(); | 381 response.close(); |
| 382 response.done.catchError((e) { | 382 response.done.catchError((e) { |
| 383 DebugLogger.warning( | 383 DebugLogger.warning( |
| 384 'HttpServer: error while closing the response stream', e); | 384 'HttpServer: error while closing the response stream', e); |
| 385 }); | 385 }); |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 | 388 |
| 389 // Helper class for displaying directory listings. | 389 // Helper class for displaying directory listings. |
| 390 class _Entry { | 390 class _Entry implements Comparable { |
| 391 final String name; | 391 final String name; |
| 392 final String displayName; | 392 final String displayName; |
| 393 | 393 |
| 394 _Entry(this.name, this.displayName); | 394 _Entry(this.name, this.displayName); |
| 395 | 395 |
| 396 int compareTo(_Entry other) { | 396 int compareTo(_Entry other) { |
| 397 return name.compareTo(other.name); | 397 return name.compareTo(other.name); |
| 398 } | 398 } |
| 399 } | 399 } |
| OLD | NEW |