| Index: tests/standalone/io/http_server_response_test.dart
|
| diff --git a/tests/standalone/io/http_server_response_test.dart b/tests/standalone/io/http_server_response_test.dart
|
| index 0e75d349842007f1218de3408d11126bc08508c0..5b0a5259c8e1b04fee67a8d0abce148901aaa00a 100644
|
| --- a/tests/standalone/io/http_server_response_test.dart
|
| +++ b/tests/standalone/io/http_server_response_test.dart
|
| @@ -243,6 +243,34 @@ void testBadResponseClose() {
|
| }
|
|
|
|
|
| +void testIgnoreRequestData() {
|
| + HttpServer.bind("127.0.0.1", 0)
|
| + .then((server) {
|
| + server.listen((request) {
|
| + // Ignore request data.
|
| + request.response.write("all-okay");
|
| + request.response.close();
|
| + });
|
| +
|
| + var client = new HttpClient();
|
| + client.get("127.0.0.1", server.port, "/")
|
| + .then((request) {
|
| + request.contentLength = 1024 * 1024;
|
| + request.add(new Uint8List(1024 * 1024));
|
| + return request.close();
|
| + })
|
| + .then((response) {
|
| + response
|
| + .fold(0, (s, b) => s + b.length)
|
| + .then((bytes) {
|
| + Expect.equals(8, bytes);
|
| + server.close();
|
| + });
|
| + });
|
| + });
|
| +}
|
| +
|
| +
|
| void main() {
|
| testResponseDone();
|
| testResponseAddStream();
|
| @@ -250,4 +278,5 @@ void main() {
|
| testResponseAddClosed();
|
| testBadResponseAdd();
|
| testBadResponseClose();
|
| + testIgnoreRequestData();
|
| }
|
|
|