| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 part of vmservice_io; | 5 part of vmservice_io; |
| 6 | 6 |
| 7 var _httpClient; | 7 var _httpClient; |
| 8 | 8 |
| 9 void _loadHttp(sendPort, uri) { | 9 void _loadHttp(sendPort, uri) { |
| 10 if (_httpClient == null) { | 10 if (_httpClient == null) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 _processLoadRequest(request) { | 81 _processLoadRequest(request) { |
| 82 var sp = request[0]; | 82 var sp = request[0]; |
| 83 var uri = Uri.parse(request[1]); | 83 var uri = Uri.parse(request[1]); |
| 84 if (uri.scheme == 'file') { | 84 if (uri.scheme == 'file') { |
| 85 _loadFile(sp, uri.toFilePath()); | 85 _loadFile(sp, uri.toFilePath()); |
| 86 } else if ((uri.scheme == 'http') || (uri.scheme == 'https')) { | 86 } else if ((uri.scheme == 'http') || (uri.scheme == 'https')) { |
| 87 _loadHttp(sp, uri); | 87 _loadHttp(sp, uri); |
| 88 } else if ((uri.scheme == 'data')) { | 88 } else if ((uri.scheme == 'data')) { |
| 89 _loadDataUri(sp, uri); | 89 _loadDataUri(sp, uri); |
| 90 } else { | 90 } else { |
| 91 sp.send('Unknown scheme for $uri'); | 91 sp.send('Unknown scheme (${uri.scheme}) for $uri'); |
| 92 } | 92 } |
| 93 } | 93 } |
| OLD | NEW |