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

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

Issue 15188003: Allow proxy settings in environment variables to be full URLs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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_proxy_configuration_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 a0f514dc6fdfd8240f0768ccd73505a9994ac9c8..df42fcfe4b884d4645b8665b34d9955ee1b54ec5 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1590,6 +1590,10 @@ class _HttpClient implements HttpClient {
if (pos >= 0) {
option = option.substring(pos + 3);
}
+ pos = option.indexOf("/");
+ if (pos >= 0) {
+ option = option.substring(0, pos);
+ }
if (option.indexOf(":") == -1) option = "$option:1080";
return "PROXY $option";
}
« no previous file with comments | « no previous file | tests/standalone/io/http_proxy_configuration_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698