Index: sdk/lib/io/http_impl.dart |
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart |
index 440b635feaa658de76a6114336d35e374c35bfdb..15a920e674cc9f398394c22a1bb11cf568d87651 100644 |
--- a/sdk/lib/io/http_impl.dart |
+++ b/sdk/lib/io/http_impl.dart |
@@ -1299,15 +1299,9 @@ abstract class _HttpConnectionBase { |
} |
void _onData() { |
- int available = _socket.available(); |
- if (available == 0) { |
- return; |
- } |
- |
- List<int> buffer = new Uint8List(available); |
- int bytesRead = _socket.readList(buffer, 0, available); |
- if (bytesRead > 0) { |
- _httpParser.writeList(buffer, 0, bytesRead); |
+ List<int> buffer = _socket.read(); |
+ if (buffer != null) { |
+ _httpParser.writeList(buffer, 0, buffer.length); |
} |
} |