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 const int _OUTGOING_BUFFER_SIZE = 8 * 1024; | 7 const int _OUTGOING_BUFFER_SIZE = 8 * 1024; |
8 | 8 |
9 typedef void _BytesConsumer(List<int> bytes); | 9 typedef void _BytesConsumer(List<int> bytes); |
10 | 10 |
11 class _HttpIncoming extends Stream<List<int>> { | 11 class _HttpIncoming extends Stream<List<int>> { |
12 final int _transferLength; | 12 final int _transferLength; |
13 final Completer _dataCompleter = new Completer(); | 13 final Completer _dataCompleter = new Completer(); |
14 Stream<List<int>> _stream; | 14 Stream<List<int>> _stream; |
15 | 15 |
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2839 const _RedirectInfo(this.statusCode, this.method, this.location); | 2839 const _RedirectInfo(this.statusCode, this.method, this.location); |
2840 } | 2840 } |
2841 | 2841 |
2842 String _getHttpVersion() { | 2842 String _getHttpVersion() { |
2843 var version = Platform.version; | 2843 var version = Platform.version; |
2844 // Only include major and minor version numbers. | 2844 // Only include major and minor version numbers. |
2845 int index = version.indexOf('.', version.indexOf('.') + 1); | 2845 int index = version.indexOf('.', version.indexOf('.') + 1); |
2846 version = version.substring(0, index); | 2846 version = version.substring(0, index); |
2847 return 'Dart/$version (dart:io)'; | 2847 return 'Dart/$version (dart:io)'; |
2848 } | 2848 } |
OLD | NEW |