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

Unified Diff: sdk/lib/io/http_parser.dart

Issue 11453006: Fix a number of HTTP issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
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;

Powered by Google App Engine
This is Rietveld 408576698