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

Side by Side Diff: test/client_websites_test.dart

Issue 1578753002: Try to send EndStreamFlag together with headers (if possible) (Closed) Base URL: git@github.com:dart-lang/http2.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/streams/stream_handler.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library http2.test.client_websites_test; 5 library http2.test.client_websites_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 var spaces = ' ' * (20 - key.length); 117 var spaces = ' ' * (20 - key.length);
118 print('$key $spaces ${headers[key].join(', ')}'); 118 print('$key $spaces ${headers[key].join(', ')}');
119 } 119 }
120 print(''); 120 print('');
121 } 121 }
122 122
123 Future<String> readBody(Response response) async { 123 Future<String> readBody(Response response) async {
124 var stream = response.stream; 124 var stream = response.stream;
125 if (response.headers['content-encoding']?.join('') == 'gzip') { 125 if (response.headers['content-encoding']?.join('') == 'gzip') {
126 stream = stream.transform(GZIP.decoder); 126 stream = stream.transform(GZIP.decoder);
127 } else if (response.headers['content-encoding']?.join('') == 'deflate') {
Søren Gjesse 2016/01/11 14:26:35 Separate change from what is in the description?
kustermann 2016/01/11 15:08:33 There is a test for twitter.com in this file, and
128 stream = stream.transform(ZLIB.decoder);
127 } 129 }
128 return await stream.transform(UTF8.decoder).join(''); 130 return await stream.transform(UTF8.decoder).join('');
129 } 131 }
OLDNEW
« no previous file with comments | « lib/src/streams/stream_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698