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

Unified Diff: pkg/http_server/test/utils.dart

Issue 119453005: Make VirtualDirectory redirect if the directory-path does not end with a tailing slash. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
Index: pkg/http_server/test/utils.dart
diff --git a/pkg/http_server/test/utils.dart b/pkg/http_server/test/utils.dart
index 90b46fdc5691f7cec05a7de82e10e0a6903aa674..f11135c8c21cd93dd8ec9c77cc23f387d815c679 100644
--- a/pkg/http_server/test/utils.dart
+++ b/pkg/http_server/test/utils.dart
@@ -13,7 +13,8 @@ Future<int> getStatusCode(int port,
{String host,
bool secure: false,
DateTime ifModifiedSince,
- bool rawPath: false}) {
+ bool rawPath: false,
+ bool followRedirects: true}) {
Uri uri;
if (rawPath) {
uri = new Uri(scheme: secure ? 'https' : 'http',
@@ -28,6 +29,7 @@ Future<int> getStatusCode(int port,
return new HttpClient().getUrl(uri)
.then((request) {
+ if (!followRedirects) request.followRedirects = false;
if (host != null) request.headers.host = host;
if (ifModifiedSince != null) {
request.headers.ifModifiedSince = ifModifiedSince;

Powered by Google App Engine
This is Rietveld 408576698