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

Unified Diff: net/base/net_util.cc

Issue 1177933002: Resolve RFC 6761 localhost names to loopback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « no previous file | net/dns/host_resolver_impl.cc » ('j') | net/dns/host_resolver_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 028b56b74a8bb526b4e486bb1c328efda71005d4..221c852aee77a311d88ff6f01c9933769a95a8bd 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -733,6 +733,8 @@ int GetPortFromSockaddr(const struct sockaddr* address, socklen_t address_len) {
bool IsLocalhost(const std::string& host) {
if (host == "localhost" || host == "localhost.localdomain" ||
host == "localhost6" || host == "localhost6.localdomain6" ||
+ host == "localhost." || host == "localhost.localdomain." ||
+ host == "localhost6." || host == "localhost6.localdomain6." ||
Ryan Sleevi 2015/06/11 00:34:03 :( on more .localdomain (these are not reserved by
estark 2015/06/11 02:35:32 Do we need to keep these .localdomain things? Why
IsLocalhostTLD(host))
return true;
« no previous file with comments | « no previous file | net/dns/host_resolver_impl.cc » ('j') | net/dns/host_resolver_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698