| 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 | 7 class _HttpIncoming |
| 8 extends Stream<List<int>> implements StreamSink<List<int>> { | 8 extends Stream<List<int>> implements StreamSink<List<int>> { |
| 9 final int _transferLength; | 9 final int _transferLength; |
| 10 final Completer _dataCompleter = new Completer(); | 10 final Completer _dataCompleter = new Completer(); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 bool _tmpIgnoreBody = _ignoreBody; | 384 bool _tmpIgnoreBody = _ignoreBody; |
| 385 _ignoreBody = false; | 385 _ignoreBody = false; |
| 386 _headersWritten = true; | 386 _headersWritten = true; |
| 387 _writeHeader(); | 387 _writeHeader(); |
| 388 _ignoreBody = _tmpIgnoreBody; | 388 _ignoreBody = _tmpIgnoreBody; |
| 389 if (_ignoreBody) { | 389 if (_ignoreBody) { |
| 390 super.close(); | 390 super.close(); |
| 391 return; | 391 return; |
| 392 } | 392 } |
| 393 _chunked = headers.chunkedTransferEncoding; | 393 _chunked = headers.chunkedTransferEncoding; |
| 394 if (!_chunked) { | 394 if (headers.contentLength >= 0) { |
| 395 _outgoing.setTransferLength(headers.contentLength); | 395 _outgoing.setTransferLength(headers.contentLength); |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 | 398 |
| 399 void _writeHeader(); // TODO(ajohnsen): Better name. | 399 void _writeHeader(); // TODO(ajohnsen): Better name. |
| 400 | 400 |
| 401 final _HttpHeaders headers; | 401 final _HttpHeaders headers; |
| 402 | 402 |
| 403 final _HttpOutgoing _outgoing; | 403 final _HttpOutgoing _outgoing; |
| 404 bool _headersWritten = false; | 404 bool _headersWritten = false; |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1621 | 1621 |
| 1622 | 1622 |
| 1623 class _RedirectInfo implements RedirectInfo { | 1623 class _RedirectInfo implements RedirectInfo { |
| 1624 const _RedirectInfo(int this.statusCode, | 1624 const _RedirectInfo(int this.statusCode, |
| 1625 String this.method, | 1625 String this.method, |
| 1626 Uri this.location); | 1626 Uri this.location); |
| 1627 final int statusCode; | 1627 final int statusCode; |
| 1628 final String method; | 1628 final String method; |
| 1629 final Uri location; | 1629 final Uri location; |
| 1630 } | 1630 } |
| OLD | NEW |