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

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

Issue 12595004: Fix handling to responses to HEAD requests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | tests/standalone/io/http_head_test.dart » ('j') | 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 68fbc324ab643af712ada50b8ab1c53930dd198b..28c2e7e4e0349a7ea90d1688a01dbb6bd6d0e615 100644
--- a/sdk/lib/io/http_parser.dart
+++ b/sdk/lib/io/http_parser.dart
@@ -566,10 +566,7 @@ class _HttpParser
_controller.add(_incoming);
break;
}
- if (_chunked) {
- _state = _State.CHUNK_SIZE;
- _remainingContent = 0;
- } else if (_transferLength == 0 ||
+ if (_transferLength == 0 ||
(_messageType == _MessageType.RESPONSE &&
Anders Johnsen 2013/03/07 09:38:59 Indentation looks off.
Søren Gjesse 2013/03/07 11:42:10 Done.
(_noMessageBody || _responseToMethod == "HEAD"))) {
_reset();
@@ -577,6 +574,9 @@ class _HttpParser
_closeIncoming();
_controller.add(tmp);
break;
+ } else if (_chunked) {
+ _state = _State.CHUNK_SIZE;
+ _remainingContent = 0;
} else if (_transferLength > 0) {
_remainingContent = _transferLength;
_state = _State.BODY;
« no previous file with comments | « no previous file | tests/standalone/io/http_head_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698