diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 13:34:40 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 13:34:40 +0000 |
commit | 605749c4bcf265ae95ebf32d4e009dba77bbfbfe (patch) | |
tree | 6697886ebdbb58d1512766b1699e23adc66b0e72 /net/base/host_resolver_impl.cc | |
parent | 4d29285d95193a12ce2797fdcef10a9ac837a782 (diff) | |
download | chromium_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/host_resolver_impl.cc')
-rw-r--r-- | net/base/host_resolver_impl.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 44bbe41..b8d4215 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.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. @@ -60,13 +60,16 @@ HostResolver* CreateSystemHostResolver( static int ResolveAddrInfo(HostResolverProc* resolver_proc, const std::string& host, AddressFamily address_family, + HostResolverFlags host_resolver_flags, AddressList* out) { if (resolver_proc) { // Use the custom procedure. - return resolver_proc->Resolve(host, address_family, out); + return resolver_proc->Resolve(host, address_family, + host_resolver_flags, out); } else { // Use the system procedure (getaddrinfo). - return SystemHostResolverProc(host, address_family, out); + return SystemHostResolverProc(host, address_family, + host_resolver_flags, out); } } @@ -323,6 +326,7 @@ class HostResolverImpl::Job error_ = ResolveAddrInfo(resolver_proc_, key_.hostname, key_.address_family, + key_.host_resolver_flags, &results_); if (requests_trace_) { @@ -743,7 +747,8 @@ int HostResolverImpl::Resolve(const RequestInfo& info, if (!callback) { AddressList addrlist; int error = ResolveAddrInfo( - effective_resolver_proc(), key.hostname, key.address_family, &addrlist); + effective_resolver_proc(), key.hostname, key.address_family, + key.host_resolver_flags, &addrlist); if (error == OK) { addrlist.SetPort(info.port()); *addresses = addrlist; @@ -1151,7 +1156,8 @@ HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest( AddressFamily effective_address_family = info.address_family(); if (effective_address_family == ADDRESS_FAMILY_UNSPECIFIED) effective_address_family = default_address_family_; - return Key(info.hostname(), effective_address_family); + return Key(info.hostname(), effective_address_family, + info.host_resolver_flags()); } HostResolverImpl::Job* HostResolverImpl::CreateAndStartJob(Request* req) { |