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

Unified Diff: net/base/net_util.h

Issue 339017: Loosen RFC 1738 compliance check to allow underscores where we already allowe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « chrome/browser/autocomplete/autocomplete_unittest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
===================================================================
--- net/base/net_util.h (revision 29940)
+++ net/base/net_util.h (working copy)
@@ -158,16 +158,17 @@
std::string CanonicalizeHost(const std::wstring& host,
url_canon::CanonHostInfo* host_info);
-// Returns true if |host| is RFC 1738-compliant (and not an IP address). The
-// rules are:
+// Returns true if |host| is not an IP address and is compliant with a set of
+// rules based on RFC 1738 and tweaked to be compatible with the real world.
+// The rules are:
// * One or more components separated by '.'
// * Each component begins and ends with an alphanumeric character
-// * Each component contains only alphanumeric characters and '-'
+// * Each component contains only alphanumeric characters and '-' or '_'
// * The last component does not begin with a digit
//
// NOTE: You should only pass in hosts that have been returned from
// CanonicalizeHost(), or you may not get accurate results.
-bool IsCanonicalizedHostRFC1738Compliant(const std::string& host);
+bool IsCanonicalizedHostCompliant(const std::string& host);
// Call these functions to get the html snippet for a directory listing.
// The return values of both functions are in UTF-8.
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_unittest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698