[flutter_tools] open chrome with unresolve hostname (#49625)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
6f0136cc4d
commit
33e61d1cd6
@@ -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);
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user