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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // It's already mapped, use it. | 137 // It's already mapped, use it. |
138 return _session; | 138 return _session; |
139 } | 139 } |
140 // Create session, store it in connection, and return. | 140 // Create session, store it in connection, and return. |
141 return _session = _httpServer._sessionManager.createSession(); | 141 return _session = _httpServer._sessionManager.createSession(); |
142 } | 142 } |
143 | 143 |
144 HttpConnectionInfo get connectionInfo => _httpConnection.connectionInfo; | 144 HttpConnectionInfo get connectionInfo => _httpConnection.connectionInfo; |
145 | 145 |
146 X509Certificate get certificate { | 146 X509Certificate get certificate { |
147 Socket socket = _httpConnection._socket; | 147 var socket = _httpConnection._socket; |
148 if (socket is SecureSocket) return socket.peerCertificate; | 148 if (socket is SecureSocket) return socket.peerCertificate; |
149 return null; | 149 return null; |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 class _HttpClientResponse | 154 class _HttpClientResponse |
155 extends _HttpInboundMessage implements HttpClientResponse { | 155 extends _HttpInboundMessage implements HttpClientResponse { |
156 List<RedirectInfo> get redirects => _httpRequest._responseRedirects; | 156 List<RedirectInfo> get redirects => _httpRequest._responseRedirects; |
157 | 157 |
(...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 | 2235 |
2236 | 2236 |
2237 class _RedirectInfo implements RedirectInfo { | 2237 class _RedirectInfo implements RedirectInfo { |
2238 const _RedirectInfo(int this.statusCode, | 2238 const _RedirectInfo(int this.statusCode, |
2239 String this.method, | 2239 String this.method, |
2240 Uri this.location); | 2240 Uri this.location); |
2241 final int statusCode; | 2241 final int statusCode; |
2242 final String method; | 2242 final String method; |
2243 final Uri location; | 2243 final Uri location; |
2244 } | 2244 } |
OLD | NEW |