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

Unified Diff: tests/standalone/io/http_server_close_response_after_error_client.dart

Issue 23479022: Make sure to never report SocketExceptions on HttpResponse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | tests/standalone/io/http_server_close_response_after_error_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_server_close_response_after_error_client.dart
diff --git a/tests/standalone/io/http_server_close_response_after_error_client.dart b/tests/standalone/io/http_server_close_response_after_error_client.dart
new file mode 100644
index 0000000000000000000000000000000000000000..990d34a44e04a2439a577901d1c74889b1e94cb0
--- /dev/null
+++ b/tests/standalone/io/http_server_close_response_after_error_client.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io';
+
+void main() {
+ int port = int.parse(new Options().arguments.first);
+ var client = new HttpClient();
+ const MAX = 64;
+ int count = 0;
+ void run() {
+ if (count++ == MAX) exit(0);
+ Socket.connect('127.0.0.1', port).then((socket) {
+ socket.write("POST / HTTP/1.1\r\n");
+ socket.write("Content-Length: 10\r\n");
+ socket.write("\r\n");
+ socket.write("LALALA");
+ socket.destroy();
+ socket.listen(null, onDone: run);
+ });
+ }
+ for (int i = 0; i < 4; i++) run();
+}
+
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | tests/standalone/io/http_server_close_response_after_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698