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

Unified Diff: pkg/http/lib/src/io_client.dart

Issue 11411327: No longer work around issue 7013 and 7014 in pkg/http. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | pkg/http/lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/io_client.dart
diff --git a/pkg/http/lib/src/io_client.dart b/pkg/http/lib/src/io_client.dart
index e263c663a156a6404db1c0c86a8e14c35cc96491..e3f141352a7b7f46788e5a12f8ec253416a6f2f7 100644
--- a/pkg/http/lib/src/io_client.dart
+++ b/pkg/http/lib/src/io_client.dart
@@ -29,22 +29,11 @@ class IOClient extends BaseClient {
connection.maxRedirects = request.maxRedirects;
connection.onError = (e) {
async.then((_) {
- if (completer.future.isComplete) {
- // TODO(nweiz): issue 7014 means that connection errors may be routed
- // here even after onResponse has been called. Since these errors are
- // also routed to the response input stream, we want to silently
- // ignore them.
- //
- // We test if they're HTTP exceptions to distinguish them from errors
- // caused by issue 4974 (see below).
- if (e is HttpException) return;
-
- // TODO(nweiz): issue 4974 means that any errors that appear in the
- // onRequest or onResponse callbacks get passed to onError. If the
- // completer has already fired, we want to re-throw those exceptions
- // to the top level so that they aren't silently ignored.
- throw e;
- }
+ // TODO(nweiz): issue 4974 means that any errors that appear in the
+ // onRequest or onResponse callbacks get passed to onError. If the
+ // completer has already fired, we want to re-throw those exceptions
+ // to the top level so that they aren't silently ignored.
+ if (completer.future.isComplete) throw e;
completer.completeException(e);
});
@@ -69,7 +58,7 @@ class IOClient extends BaseClient {
response.headers.forEach((key, value) => headers[key] = value);
completer.complete(new StreamedResponse(
- wrapInputStream(response.inputStream),
+ response.inputStream,
response.statusCode,
response.contentLength,
request: request,
« no previous file with comments | « no previous file | pkg/http/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698