Chromium Code Reviews

Unified Diff: lib/src/util/io.dart

Issue 1417943004: Use shelf's Server API in browser/server. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/util/io.dart
diff --git a/lib/src/util/io.dart b/lib/src/util/io.dart
index ceb8da6c9992ecc06e79cb933e99eab5d0b4805a..8ae80b5f542a466ffa071599f33ac170d515ae12 100644
--- a/lib/src/util/io.dart
+++ b/lib/src/util/io.dart
@@ -126,23 +126,6 @@ void warn(String message, {bool color}) {
stderr.writeln(wordWrap("$header $message\n"));
}
-/// Creates a URL string for [address]:[port].
-///
-/// Handles properly formatting IPv6 addresses.
-Uri baseUrlForAddress(InternetAddress address, int port) {
- if (address.isLoopback) {
- return new Uri(scheme: "http", host: "localhost", port: port);
- }
-
- // IPv6 addresses in URLs need to be enclosed in square brackets to avoid
- // URL ambiguity with the ":" in the address.
- if (address.type == InternetAddressType.IP_V6) {
- return new Uri(scheme: "http", host: "[${address.address}]", port: port);
- }
-
- return new Uri(scheme: "http", host: address.address, port: port);
-}
-
/// Returns the package root at [root].
///
/// If [override] is passed, that's used. If the package root doesn't exist, an
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine