| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class _HttpRequestResponseBase { | 5 class _HttpRequestResponseBase { |
| 6 _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection) | 6 _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection) |
| 7 : _contentLength = -1, | 7 : _contentLength = -1, |
| 8 _keepAlive = false, | 8 _keepAlive = false, |
| 9 _headers = new Map(); | 9 _headers = new Map(); |
| 10 | 10 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 if (_state != DONE) { | 287 if (_state != DONE) { |
| 288 _httpConnection.outputStream.onNoPendingWrites = callback; | 288 _httpConnection.outputStream.onNoPendingWrites = callback; |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 | 291 |
| 292 void _streamSetCloseHandler(callback()) { | 292 void _streamSetCloseHandler(callback()) { |
| 293 // TODO(sgjesse): Handle this. | 293 // TODO(sgjesse): Handle this. |
| 294 } | 294 } |
| 295 | 295 |
| 296 void _streamSetErrorHandler(callback(Exception e)) { | 296 void _streamSetErrorHandler(callback(Exception e)) { |
| 297 _streamErrorHandler = callback | 297 _streamErrorHandler = callback; |
| 298 } | 298 } |
| 299 | 299 |
| 300 String _findReasonPhrase(int statusCode) { | 300 String _findReasonPhrase(int statusCode) { |
| 301 if (_reasonPhrase != null) { | 301 if (_reasonPhrase != null) { |
| 302 return _reasonPhrase; | 302 return _reasonPhrase; |
| 303 } | 303 } |
| 304 | 304 |
| 305 switch (statusCode) { | 305 switch (statusCode) { |
| 306 case HttpStatus.CONTINUE: return "Continue"; | 306 case HttpStatus.CONTINUE: return "Continue"; |
| 307 case HttpStatus.SWITCHING_PROTOCOLS: return "Switching Protocols"; | 307 case HttpStatus.SWITCHING_PROTOCOLS: return "Switching Protocols"; |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 sockets.addFirst(socketConn); | 1197 sockets.addFirst(socketConn); |
| 1198 socketConn._markReturned(); | 1198 socketConn._markReturned(); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 Function _onOpen; | 1201 Function _onOpen; |
| 1202 Map<String, Queue<_SocketConnection>> _openSockets; | 1202 Map<String, Queue<_SocketConnection>> _openSockets; |
| 1203 Set<_SocketConnection> _activeSockets; | 1203 Set<_SocketConnection> _activeSockets; |
| 1204 Timer _evictionTimer; | 1204 Timer _evictionTimer; |
| 1205 bool _shutdown; // Has this HTTP client been shutdown? | 1205 bool _shutdown; // Has this HTTP client been shutdown? |
| 1206 } | 1206 } |
| OLD | NEW |