summaryrefslogtreecommitdiffstats
path: root/net/base/address_list.cc
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 13:34:40 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 13:34:40 +0000
commit605749c4bcf265ae95ebf32d4e009dba77bbfbfe (patch)
tree6697886ebdbb58d1512766b1699e23adc66b0e72 /net/base/address_list.cc
parent4d29285d95193a12ce2797fdcef10a9ac837a782 (diff)
downloadchromium_src-605749c4bcf265ae95ebf32d4e009dba77bbfbfe.zip
chromium_src-605749c4bcf265ae95ebf32d4e009dba77bbfbfe.tar.gz
chromium_src-605749c4bcf265ae95ebf32d4e009dba77bbfbfe.tar.bz2
HostResolver now adds AI_CANONNAME to the hint flags if a requester needs the information.
Requests which want the canonical name should be treated differently from requests that do not for the same host in both the HostCache as well as in the HostResolver when combining multiple outstanding requests into a job. The motivation for this is that Kerberos SPN's for a web server are typically generated using the canonical name of the server rather than a DNS alias (both Firefox and IE have this behavior). BUG=29862 TEST=net_unittests Review URL: http://codereview.chromium.org/1566012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/address_list.cc')
-rw-r--r--net/base/address_list.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/base/address_list.cc b/net/base/address_list.cc
index d1624be..55a5992 100644
--- a/net/base/address_list.cc
+++ b/net/base/address_list.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -133,6 +133,14 @@ int AddressList::GetPort() const {
return ntohs(*port_field);
}
+bool AddressList::GetCanonicalName(std::string* canonical_name) const {
+ DCHECK(canonical_name);
+ if (!data_->head || !data_->head->ai_canonname)
+ return false;
+ canonical_name->assign(data_->head->ai_canonname);
+ return true;
+}
+
void AddressList::SetFrom(const AddressList& src, int port) {
if (src.GetPort() == port) {
// We can reference the data from |src| directly.