Commit 33e61d1c authored by Jonah Williams's avatar Jonah Williams Committed by Flutter GitHub Bot

[flutter_tools] open chrome with unresolve hostname (#49625)

parent 6f0136cc
......@@ -340,10 +340,7 @@ class WebFs {
client,
server,
dwds,
// Format ipv6 hosts according to RFC 5952.
internetAddress.type == InternetAddressType.IPv4
? 'http://${internetAddress.address}:$hostPort'
: 'http://[${internetAddress.address}]:$hostPort',
'http://$effectiveHostname:$hostPort',
assetServer,
buildInfo.isDebug,
flutterProject,
......
......@@ -276,13 +276,7 @@ class WebDevFS implements DevFS {
@override
Future<Uri> create() async {
_webAssetServer = await WebAssetServer.start(hostname, port);
final InternetAddress internetAddress = _webAssetServer.internetAddress;
// Format ipv6 hosts according to RFC 5952.
return Uri.parse(
internetAddress.type == InternetAddressType.IPv4
? 'http://${internetAddress.address}:$port'
: 'http://[${internetAddress.address}]:$port'
);
return Uri.parse('http://$hostname:$port');
}
@override
......
......@@ -181,10 +181,7 @@ void main() {
dartDefines: const <String>[],
);
// Might be either ipv4 or ipv6 for localhost.
final bool hasExpectedUri = webFs.uri.toString().contains('[::1]:1234') ||
webFs.uri.toString().contains('127.0.0.1:1234');
expect(hasExpectedUri, true);
expect(webFs.uri.toString(), contains('localhost'));
expect(lastPort, 1234);
}));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment