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

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

Issue 335373003: New Uri.parse and validation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More test. Created 6 years, 6 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: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index f9fedc3410bf898fec9521989910eeef3ea6c366..b0a1d8fb35b4847b094593bf2f02beb3a96482f4 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1674,10 +1674,10 @@ class _HttpClient implements HttpClient {
String host,
int port,
String path) {
+ Uri uri = new Uri(scheme: "http", host: host, port: port).resolve(path);
// TODO(sgjesse): The path set here can contain both query and
// fragment. They should be cracked and set correctly.
- return _openUrl(method, new Uri(
- scheme: "http", host: host, port: port, path: path));
+ return _openUrl(method, uri);
}
Future<HttpClientRequest> openUrl(String method, Uri url) {
« no previous file with comments | « sdk/lib/core/uri.dart ('k') | tests/co19/co19-co19.status » ('j') | tests/corelib/uri_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698