| 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 dartiverse_search; | 5 library dartiverse_search; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 virDir.jailRoot = false; | 112 virDir.jailRoot = false; |
| 113 virDir.allowDirectoryListing = true; | 113 virDir.allowDirectoryListing = true; |
| 114 virDir.directoryHandler = (dir, request) { | 114 virDir.directoryHandler = (dir, request) { |
| 115 // Redirect directory-requests to index.html files. | 115 // Redirect directory-requests to index.html files. |
| 116 var indexUri = new Uri.file(dir.path).resolve('index.html'); | 116 var indexUri = new Uri.file(dir.path).resolve('index.html'); |
| 117 virDir.serveFile(new File(indexUri.toFilePath()), request); | 117 virDir.serveFile(new File(indexUri.toFilePath()), request); |
| 118 }; | 118 }; |
| 119 virDir.serve(router.defaultStream); | 119 virDir.serve(router.defaultStream); |
| 120 }); | 120 }); |
| 121 } | 121 } |
| OLD | NEW |