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

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

Issue 11359085: Refactor HTTP parser to hold current buffer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed more comments Created 8 years, 1 month 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 | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 19dda9753114bcb68e848777fccd7f9040b2644a..440b635feaa658de76a6114336d35e374c35bfdb 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1307,15 +1307,7 @@ abstract class _HttpConnectionBase {
List<int> buffer = new Uint8List(available);
int bytesRead = _socket.readList(buffer, 0, available);
if (bytesRead > 0) {
- int parsed = _httpParser.writeList(buffer, 0, bytesRead);
- if (!_httpParser.upgrade) {
- if (parsed != bytesRead) {
- if (_socket != null) {
- // TODO(sgjesse): Error handling.
- _destroy();
- }
- }
- }
+ _httpParser.writeList(buffer, 0, bytesRead);
}
}
@@ -1341,7 +1333,7 @@ abstract class _HttpConnectionBase {
Socket socket = _socket;
_socket = null;
if (onDetach != null) onDetach();
- return new _DetachedSocket(socket, _httpParser.unparsedData);
+ return new _DetachedSocket(socket, _httpParser.readUnparsedData());
}
HttpConnectionInfo get connectionInfo {
« no previous file with comments | « no previous file | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698