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

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

Issue 1077603002: Cleanup change in r44998 a bit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_parser.dart
diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart
index e7415cf49e33e90a216bbad1d559f65363a8afe2..97d4fd7c8dcc7b64d94f18e0fd1143e806617b56 100644
--- a/sdk/lib/io/http_parser.dart
+++ b/sdk/lib/io/http_parser.dart
@@ -619,11 +619,8 @@ class _HttpParser extends Stream<_HttpIncoming> {
if (byte == _CharCode.CR) {
_state = _State.HEADER_ENDING;
} else if (byte == _CharCode.LF) {
- if (_headersEnd()) {
- return;
- } else {
- break;
- }
+ _state = _State.HEADER_ENDING;
+ _index--; // Make the new state see the LF again.
} else {
// Start of new header field.
_headerField.add(_toLowerCaseByte(byte));
@@ -697,11 +694,8 @@ class _HttpParser extends Stream<_HttpIncoming> {
if (byte == _CharCode.CR) {
_state = _State.HEADER_ENDING;
} else if (byte == _CharCode.LF) {
- if (_headersEnd()) {
- return;
- } else {
- break;
- }
+ _state = _State.HEADER_ENDING;
+ _index--; // Make the new state see the LF again.
} else {
// Start of new header field.
_headerField.add(_toLowerCaseByte(byte));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698