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

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

Issue 11368139: Remove a state variable from the HTTP library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | no next file » | 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 15a920e674cc9f398394c22a1bb11cf568d87651..4b8488e8c870964e709a964ffb7f906e38916ab1 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -855,7 +855,6 @@ class _HttpRequest extends _HttpRequestResponseBase implements HttpRequest {
InputStream get inputStream {
if (_inputStream == null) {
_inputStream = new _HttpInputStream(this);
- _inputStream._streamMarkedClosed = _dataEndCalled;
}
return _inputStream;
}
@@ -913,8 +912,11 @@ class _HttpRequest extends _HttpRequestResponseBase implements HttpRequest {
}
void _onDataEnd() {
- if (_inputStream != null) _inputStream._closeReceived();
- _dataEndCalled = true;
+ if (_inputStream != null) {
+ _inputStream._closeReceived();
+ } else {
+ inputStream._streamMarkedClosed = true;
+ }
}
// Escaped characters in uri are expected to have been parsed.
@@ -957,7 +959,6 @@ class _HttpRequest extends _HttpRequestResponseBase implements HttpRequest {
Map<String, String> _queryParameters;
_HttpInputStream _inputStream;
_BufferList _buffer;
- bool _dataEndCalled = false;
Function _streamErrorHandler;
_HttpSession _session;
}
@@ -1769,7 +1770,6 @@ class _HttpClientResponse
InputStream get inputStream {
if (_inputStream == null) {
_inputStream = new _HttpInputStream(this);
- _inputStream._streamMarkedClosed = _dataEndCalled;
}
return _inputStream;
}
@@ -1907,8 +1907,11 @@ class _HttpClientResponse
void _onDataEnd() {
_connection._responseDone();
- if (_inputStream != null) _inputStream._closeReceived();
- _dataEndCalled = true;
+ if (_inputStream != null) {
+ _inputStream._closeReceived();
+ } else {
+ inputStream._streamMarkedClosed = true;
+ }
}
// Delegate functions for the HttpInputStream implementation.
@@ -1936,7 +1939,6 @@ class _HttpClientResponse
_HttpClientConnection _connection;
_HttpInputStream _inputStream;
_BufferList _buffer;
- bool _dataEndCalled = false;
Function _streamErrorHandler;
}
« 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