| 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 // Send a response to the requesting isolate. | 9 // Send a response to the requesting isolate. |
| 10 void _sendResponse(SendPort sp, int id, dynamic data) { | 10 void _sendResponse(SendPort sp, int id, dynamic data) { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 int id = request[1]; | 94 int id = request[1]; |
| 95 String resource = request[2]; | 95 String resource = request[2]; |
| 96 var uri = Uri.parse(request[2]); | 96 var uri = Uri.parse(request[2]); |
| 97 if (uri.scheme == 'file') { | 97 if (uri.scheme == 'file') { |
| 98 _loadFile(sp, id, uri); | 98 _loadFile(sp, id, uri); |
| 99 } else if ((uri.scheme == 'http') || (uri.scheme == 'https')) { | 99 } else if ((uri.scheme == 'http') || (uri.scheme == 'https')) { |
| 100 _loadHttp(sp, id, uri); | 100 _loadHttp(sp, id, uri); |
| 101 } else if ((uri.scheme == 'data')) { | 101 } else if ((uri.scheme == 'data')) { |
| 102 _loadDataUri(sp, id, uri); | 102 _loadDataUri(sp, id, uri); |
| 103 } else { | 103 } else { |
| 104 sp.send('Unknown scheme (${uri.scheme}) for $uri'); | 104 sp.send([id, 'Unknown scheme (${uri.scheme}) for $uri']); |
| 105 } | 105 } |
| 106 } | 106 } |
| OLD | NEW |