Original patch by [email protected] (see http://codereview.chromium.org/113944)
- Pull in googleurl r107, which includes the new CanonicalizeHostVerbose()
function:
http://code.google.com/p/google-url/source/detail?r=107
- Atomically update Chromium to make use of this new function. This allows us
to extract better information about IP addresses using fewer, and cleaner, calls
to googleurl.
- Also, change a call to CanonicalizeIPAddress() to stay compatible with r107.
The upshot of all this is, Chrome will no longer try to connect to IPv4
addresses with overflow "http://192.168.0.257", or hostnames surrounded by
square brackets "http://[google.com]"
BUG=none
TEST={unit_tests,googleurl_unittests,net_unittests}
Review URL: http://codereview.chromium.org/146053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19076 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 00696fef..31d55dc 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -285,7 +285,8 @@
// domain=.my.domain.com -- for compatibility we do the same here. Firefox
// also treats domain=.....my.domain.com like domain=.my.domain.com, but
// neither IE nor Safari do this, and we don't either.
- std::string cookie_domain(net::CanonicalizeHost(pc.Domain(), NULL));
+ url_canon::CanonHostInfo ignored;
+ std::string cookie_domain(net::CanonicalizeHost(pc.Domain(), &ignored));
if (cookie_domain.empty())
return false;
if (cookie_domain[0] != '.')