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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 class _HttpIncoming extends Stream<List<int>> { | 7 class _HttpIncoming extends Stream<List<int>> { |
8 final int _transferLength; | 8 final int _transferLength; |
9 final Completer _dataCompleter = new Completer(); | 9 final Completer _dataCompleter = new Completer(); |
10 Stream<List<int>> _stream; | 10 Stream<List<int>> _stream; |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 // TODO(ajohnsen): Use eviction timeout. | 1089 // TODO(ajohnsen): Use eviction timeout. |
1090 static const int DEFAULT_EVICTION_TIMEOUT = 60000; | 1090 static const int DEFAULT_EVICTION_TIMEOUT = 60000; |
1091 bool _closing = false; | 1091 bool _closing = false; |
1092 | 1092 |
1093 final Map<String, Queue<_HttpClientConnection>> _idleConnections | 1093 final Map<String, Queue<_HttpClientConnection>> _idleConnections |
1094 = new Map<String, Queue<_HttpClientConnection>>(); | 1094 = new Map<String, Queue<_HttpClientConnection>>(); |
1095 final Set<_HttpClientConnection> _activeConnections | 1095 final Set<_HttpClientConnection> _activeConnections |
1096 = new Set<_HttpClientConnection>(); | 1096 = new Set<_HttpClientConnection>(); |
1097 final List<_Credentials> _credentials = []; | 1097 final List<_Credentials> _credentials = []; |
1098 Function _authenticate; | 1098 Function _authenticate; |
1099 Function _findProxy; | 1099 Function _findProxy = HttpClient.findProxyFromEnvironment; |
1100 | 1100 |
1101 Future<HttpClientRequest> open(String method, | 1101 Future<HttpClientRequest> open(String method, |
1102 String host, | 1102 String host, |
1103 int port, | 1103 int port, |
1104 String path) { | 1104 String path) { |
1105 // TODO(sgjesse): The path set here can contain both query and | 1105 // TODO(sgjesse): The path set here can contain both query and |
1106 // fragment. They should be cracked and set correctly. | 1106 // fragment. They should be cracked and set correctly. |
1107 return _openUrl(method, new Uri.fromComponents( | 1107 return _openUrl(method, new Uri.fromComponents( |
1108 scheme: "http", domain: host, port: port, path: path)); | 1108 scheme: "http", domain: host, port: port, path: path)); |
1109 } | 1109 } |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1825 | 1825 |
1826 | 1826 |
1827 class _RedirectInfo implements RedirectInfo { | 1827 class _RedirectInfo implements RedirectInfo { |
1828 const _RedirectInfo(int this.statusCode, | 1828 const _RedirectInfo(int this.statusCode, |
1829 String this.method, | 1829 String this.method, |
1830 Uri this.location); | 1830 Uri this.location); |
1831 final int statusCode; | 1831 final int statusCode; |
1832 final String method; | 1832 final String method; |
1833 final Uri location; | 1833 final Uri location; |
1834 } | 1834 } |
OLD | NEW |