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

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

Issue 12300017: Throw an error when we redirect on a non-persistent connection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | tests/standalone/io/http_redirect_test.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 70c6c532f1522667a5897d0999664ddb54472b59..4a8d266a2fb10cbc5186ae5000db40eb0b87cb18 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1359,6 +1359,11 @@ class _HttpClientResponse
}
}
}
+ if (!persistentConnection) {
+ throw new RedirectException(
+ "Non-persistent connections are currently not supported for "
+ "redirects", _connection._redirects);
+ }
// Drain body and redirect.
inputStream.onData = inputStream.read;
if (_statusCode == HttpStatus.SEE_OTHER &&
« no previous file with comments | « no previous file | tests/standalone/io/http_redirect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698