| 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();
|
| +}
|
| +
|
|
|