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

Unified Diff: chrome/browser/local_discovery/privet_http_impl.cc

Issue 1440063002: Use net::HostPortPair::HostForURL to fix IPv6 in URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@context4
Patch Set: Created 5 years, 1 month 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: chrome/browser/local_discovery/privet_http_impl.cc
diff --git a/chrome/browser/local_discovery/privet_http_impl.cc b/chrome/browser/local_discovery/privet_http_impl.cc
index 9c532313e862293a9cba0c291735a41e98bcd572..ff43e246238ba27c9b50caccbce7d1413f883608 100644
--- a/chrome/browser/local_discovery/privet_http_impl.cc
+++ b/chrome/browser/local_discovery/privet_http_impl.cc
@@ -716,7 +716,8 @@ scoped_ptr<PrivetURLFetcher> PrivetHTTPClientImpl::CreateURLFetcher(
net::URLFetcher::RequestType request_type,
PrivetURLFetcher::Delegate* delegate) {
GURL::Replacements replacements;
- replacements.SetHostStr(host_port_.host());
+ std::string host = host_port_.HostForURL();
+ replacements.SetHostStr(host);
std::string port = base::UintToString(host_port_.port());
replacements.SetPortStr(port);
std::string scheme = IsInHttpsMode() ? "https" : "http";

Powered by Google App Engine
This is Rietveld 408576698