| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 } | 560 } |
| 561 | 561 |
| 562 _ensureController() { | 562 _ensureController() { |
| 563 if (_controller != null) return; | 563 if (_controller != null) return; |
| 564 _controller = new StreamController(onPause: _onPause, | 564 _controller = new StreamController(onPause: _onPause, |
| 565 onResume: _onPause, | 565 onResume: _onPause, |
| 566 onListen: _onListen, | 566 onListen: _onListen, |
| 567 onCancel: _onListen); | 567 onCancel: _onListen); |
| 568 _outbound._addStream(_controller.stream) | 568 _outbound._addStream(_controller.stream) |
| 569 .then((_) { | 569 .then((_) { |
| 570 _onListen(); // Make sure we unsubscribe. |
| 570 _done(); | 571 _done(); |
| 571 _closeCompleter.complete(_outbound); | 572 _closeCompleter.complete(_outbound); |
| 572 }, | 573 }, |
| 573 onError: (error) { | 574 onError: (error) { |
| 574 if (!_done(error)) { | 575 if (!_done(error)) { |
| 575 _closeCompleter.completeError(error); | 576 _closeCompleter.completeError(error); |
| 576 } | 577 } |
| 577 }); | 578 }); |
| 578 } | 579 } |
| 579 | 580 |
| (...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 | 2231 |
| 2231 | 2232 |
| 2232 class _RedirectInfo implements RedirectInfo { | 2233 class _RedirectInfo implements RedirectInfo { |
| 2233 const _RedirectInfo(int this.statusCode, | 2234 const _RedirectInfo(int this.statusCode, |
| 2234 String this.method, | 2235 String this.method, |
| 2235 Uri this.location); | 2236 Uri this.location); |
| 2236 final int statusCode; | 2237 final int statusCode; |
| 2237 final String method; | 2238 final String method; |
| 2238 final Uri location; | 2239 final Uri location; |
| 2239 } | 2240 } |
| OLD | NEW |