| 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 | 9 |
| 10 import 'dart:convert' show HtmlEscape; | 10 import 'dart:convert' show HtmlEscape; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 """); | 453 """); |
| 454 response.close(); | 454 response.close(); |
| 455 response.done.catchError((e) { | 455 response.done.catchError((e) { |
| 456 DebugLogger.warning( | 456 DebugLogger.warning( |
| 457 'HttpServer: error while closing the response stream', e); | 457 'HttpServer: error while closing the response stream', e); |
| 458 }); | 458 }); |
| 459 } | 459 } |
| 460 } | 460 } |
| 461 | 461 |
| 462 // Helper class for displaying directory listings. | 462 // Helper class for displaying directory listings. |
| 463 class _Entry implements Comparable { | 463 class _Entry implements Comparable<_Entry> { |
| 464 final String name; | 464 final String name; |
| 465 final String displayName; | 465 final String displayName; |
| 466 | 466 |
| 467 _Entry(this.name, this.displayName); | 467 _Entry(this.name, this.displayName); |
| 468 | 468 |
| 469 int compareTo(_Entry other) { | 469 int compareTo(_Entry other) { |
| 470 return name.compareTo(other.name); | 470 return name.compareTo(other.name); |
| 471 } | 471 } |
| 472 } | 472 } |
| OLD | NEW |