| Index: sdk/lib/io/http_parser.dart
|
| diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart
|
| index 7bb9197b48abb7935cbbdb2baaaa9085f24202ee..9dd569b9fde4e95c60190e9f6ffb422edef36376 100644
|
| --- a/sdk/lib/io/http_parser.dart
|
| +++ b/sdk/lib/io/http_parser.dart
|
| @@ -630,10 +630,10 @@ class _HttpParser {
|
| }
|
|
|
| void streamError(e) {
|
| - // Don't report errors when HTTP parser is in idle state. Clients
|
| - // can close the connection and cause a connection reset by peer
|
| - // error which is OK.
|
| - if (_state == _State.START) {
|
| + // Don't report errors for a request parser when HTTP parser is in
|
| + // idle state. Clients can close the connection and cause a
|
| + // connection reset by peer error which is OK.
|
| + if (_requestParser && _state == _State.START) {
|
| closed();
|
| return;
|
| }
|
| @@ -654,6 +654,10 @@ class _HttpParser {
|
| _state = _State.CANCELED;
|
| }
|
|
|
| + void restart() {
|
| + _reset();
|
| + }
|
| +
|
| int get messageType => _messageType;
|
| int get contentLength => _contentLength;
|
| bool get upgrade => _connectionUpgrade && _state == _State.UPGRADED;
|
|
|