| Index: sdk/lib/io/http_impl.dart
|
| diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
|
| index 73acb00df7c2ac96fbe9abf6a14af856dafa9ded..b2d63b6a393a235fb017ba160bef1ed609b04a8e 100644
|
| --- a/sdk/lib/io/http_impl.dart
|
| +++ b/sdk/lib/io/http_impl.dart
|
| @@ -47,9 +47,9 @@ class _HttpIncoming extends Stream<List<int>> {
|
| // Is completed once all data have been received.
|
| Future get dataDone => _dataCompleter.future;
|
|
|
| - void close() {
|
| + void close(bool closing) {
|
| fullBodyRead = true;
|
| - _dataCompleter.complete();
|
| + _dataCompleter.complete(closing);
|
| }
|
| }
|
|
|
| @@ -1668,6 +1668,10 @@ class _HttpConnection {
|
| _socket.pipe(_httpParser);
|
| _subscription = _httpParser.listen(
|
| (incoming) {
|
| + // If the incoming was closed, close the connection.
|
| + incoming.dataDone.then((closing) {
|
| + if (closing) destroy();
|
| + });
|
| // Only handle one incoming request at the time. Keep the
|
| // stream paused until the request has been send.
|
| _subscription.pause();
|
|
|