From 71c67d53479c2872766569a4f43f991fff4a6036 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Fri, 1 Jul 2022 22:03:06 +0800 Subject: [PATCH] Fix incorrect formatting of URL with IPv6 brackets --- src/net/tools/naive/naive_connection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/tools/naive/naive_connection.cc b/src/net/tools/naive/naive_connection.cc index ee9c68e842..e66988d500 100644 --- a/src/net/tools/naive/naive_connection.cc +++ b/src/net/tools/naive/naive_connection.cc @@ -247,7 +247,7 @@ int NaiveConnection::DoConnectServer() { url::CanonHostInfo host_info; url::SchemeHostPort endpoint( - "http", CanonicalizeHost(origin.host(), &host_info), origin.port(), + "http", CanonicalizeHost(origin.HostForURL(), &host_info), origin.port(), url::SchemeHostPort::ALREADY_CANONICALIZED); if (!endpoint.IsValid()) { LOG(ERROR) << "Connection " << id_ << " to invalid origin " << origin.ToString();