summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver_proc.cc
diff options
context:
space:
mode:
authoragayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 21:34:47 +0000
committeragayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 21:34:47 +0000
commit6e78dfb46a07e5ee38225e0cd32fa8b70ed41558 (patch)
treec00c45283a8b8f86eb079395ee4ba56c9954c215 /net/base/host_resolver_proc.cc
parenta13cc36d904c699cd37f80a1c5200f21a7a54671 (diff)
downloadchromium_src-6e78dfb46a07e5ee38225e0cd32fa8b70ed41558.zip
chromium_src-6e78dfb46a07e5ee38225e0cd32fa8b70ed41558.tar.gz
chromium_src-6e78dfb46a07e5ee38225e0cd32fa8b70ed41558.tar.bz2
HostResolverImpl: don't interpret NULL callback argument as a request to do synchronous resolution.
BUG=90547,60149 TEST=net_unittests Review URL: http://codereview.chromium.org/7520026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94552 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_proc.cc')
-rw-r--r--net/base/host_resolver_proc.cc13
1 files changed, 0 insertions, 13 deletions
diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc
index 88e0ba1..755f119 100644
--- a/net/base/host_resolver_proc.cc
+++ b/net/base/host_resolver_proc.cc
@@ -122,22 +122,9 @@ int SystemHostResolverProc(const std::string& host,
HostResolverFlags host_resolver_flags,
AddressList* addrlist,
int* os_error) {
- static const size_t kMaxHostLength = 4096;
-
if (os_error)
*os_error = 0;
- // The result of |getaddrinfo| for empty hosts is inconsistent across systems.
- // On Windows it gives the default interface's address, whereas on Linux it
- // gives an error. We will make it fail on all platforms for consistency.
- if (host.empty())
- return ERR_NAME_NOT_RESOLVED;
-
- // Limit the size of hostnames that will be resolved to combat issues in some
- // platform's resolvers.
- if (host.size() > kMaxHostLength)
- return ERR_NAME_NOT_RESOLVED;
-
struct addrinfo* ai = NULL;
struct addrinfo hints = {0};