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

Unified Diff: runtime/bin/http_impl.dart

Issue 9812005: Change the message body handling in the HTTP parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | runtime/bin/http_parser.dart » ('j') | runtime/bin/http_parser.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index 10df7594329e64ca19dc553c4cd5a20177c10f3c..291bc7c2725ab8107a5a9b7375b488064bc4e953 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -893,10 +893,14 @@ class _HttpClientConnection
_httpParser.headersComplete = () => _onHeadersComplete();
_httpParser.dataReceived = (data) => _onDataReceived(data);
_httpParser.dataEnd = () => _onDataEnd();
+ // Tell the HTTP parser the method it is expecting a response to.
+ _httpParser.responseToMethod = _method;
+
onDisconnect = _onDisconnected;
}
HttpClientRequest open(String method, String uri) {
+ _method = method;
_request = new _HttpClientRequest(method, uri, this);
_request.keepAlive = true;
_response = new _HttpClientResponse(this);
@@ -958,6 +962,7 @@ class _HttpClientConnection
_SocketConnection _socketConn;
HttpClientRequest _request;
HttpClientResponse _response;
+ String _method;
// Callbacks.
var requestReceived;
« no previous file with comments | « no previous file | runtime/bin/http_parser.dart » ('j') | runtime/bin/http_parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698