| 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 StreamController _controller; | 555 StreamController _controller; |
| 556 StreamSubscription _subscription; | 556 StreamSubscription _subscription; |
| 557 Completer _closeCompleter = new Completer(); | 557 Completer _closeCompleter = new Completer(); |
| 558 Completer _completer; | 558 Completer _completer; |
| 559 bool _socketError = false; | 559 bool _socketError = false; |
| 560 | 560 |
| 561 _HttpOutboundConsumer(_HttpOutboundMessage this._outbound); | 561 _HttpOutboundConsumer(_HttpOutboundMessage this._outbound); |
| 562 | 562 |
| 563 void _cancel() { | 563 void _cancel() { |
| 564 if (_subscription != null) { | 564 if (_subscription != null) { |
| 565 _subscription.cancel(); | 565 StreamSubscription subscription = _subscription; |
| 566 _subscription = null; |
| 567 subscription.cancel(); |
| 566 } | 568 } |
| 567 } | 569 } |
| 568 | 570 |
| 569 _ensureController() { | 571 _ensureController() { |
| 570 if (_controller != null) return; | 572 if (_controller != null) return; |
| 571 _controller = new StreamController(onPause: () => _subscription.pause(), | 573 _controller = new StreamController(onPause: () => _subscription.pause(), |
| 572 onResume: () => _subscription.resume(), | 574 onResume: () => _subscription.resume(), |
| 573 onListen: () => _subscription.resume(), | 575 onListen: () => _subscription.resume(), |
| 574 onCancel: _cancel); | 576 onCancel: _cancel); |
| 575 _outbound._addStream(_controller.stream) | 577 _outbound._addStream(_controller.stream) |
| (...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2336 | 2338 |
| 2337 | 2339 |
| 2338 class _RedirectInfo implements RedirectInfo { | 2340 class _RedirectInfo implements RedirectInfo { |
| 2339 const _RedirectInfo(int this.statusCode, | 2341 const _RedirectInfo(int this.statusCode, |
| 2340 String this.method, | 2342 String this.method, |
| 2341 Uri this.location); | 2343 Uri this.location); |
| 2342 final int statusCode; | 2344 final int statusCode; |
| 2343 final String method; | 2345 final String method; |
| 2344 final Uri location; | 2346 final Uri location; |
| 2345 } | 2347 } |
| OLD | NEW |