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

Side by Side Diff: tests/standalone/io/http_server_response_test.dart

Issue 65043019: Use a re-usable buffer for writing HTTP headers. This includes a new header limit of 8192 bytes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup. Created 7 years, 1 month 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 | « tests/standalone/io/http_client_request_test.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) 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 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 .fold(0, (s, b) => s + b.length) 267 .fold(0, (s, b) => s + b.length)
268 .then((bytes) { 268 .then((bytes) {
269 Expect.equals(8, bytes); 269 Expect.equals(8, bytes);
270 server.close(); 270 server.close();
271 }); 271 });
272 }); 272 });
273 }); 273 });
274 } 274 }
275 275
276 276
277 void testBadHeaders() {
278 testServerRequest((server, request) {
279 var value = "a";
280 for (int i = 0; i < 8 * 1024; i++) {
281 value += 'a';
282 }
283 request.response.headers.set('name', value);
284 request.response.close().catchError((error) {
285 server.close();
286 }, test: (e) => e is HttpException);
287 });
288 }
289
290
277 void main() { 291 void main() {
278 testResponseDone(); 292 testResponseDone();
279 testResponseAddStream(); 293 testResponseAddStream();
280 testResponseAddStreamClosed(); 294 testResponseAddStreamClosed();
281 testResponseAddClosed(); 295 testResponseAddClosed();
282 testBadResponseAdd(); 296 testBadResponseAdd();
283 testBadResponseClose(); 297 testBadResponseClose();
284 testIgnoreRequestData(); 298 testIgnoreRequestData();
299 testBadHeaders();
285 } 300 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_client_request_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698