Index: sdk/lib/io/http_impl.dart |
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart |
index 07ef4fe063f389209ade364ccb24a22047b4a981..458333d3475d6d05bb43804d600e0bd42901e3ad 100644 |
--- a/sdk/lib/io/http_impl.dart |
+++ b/sdk/lib/io/http_impl.dart |
@@ -1578,9 +1578,11 @@ class _HttpClient implements HttpClient { |
throw new ArgumentError(method); |
} |
if (method != "CONNECT") { |
- if (uri.host.isEmpty || |
- (uri.scheme != "http" && uri.scheme != "https")) { |
- throw new ArgumentError("Unsupported scheme '${uri.scheme}' in $uri"); |
+ if (uri.host.isEmpty) { |
+ throw new ArgumentError("No host specified in URI $uri"); |
+ } else if (uri.scheme != "http" && uri.scheme != "https") { |
+ throw new ArgumentError( |
+ "Unsupported scheme '${uri.scheme}' in URI $uri"); |
} |
} |