Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: sdk/lib/io/http_impl.dart

Issue 12383048: Improve support for HTTP 1.0 clients (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | tests/standalone/io/http_10_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | tests/standalone/io/http_10_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698