зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1057688 - Skip doing a DNSPrefetch when LOAD_NO_NETWORK_IO or ONLY_FROM_CACHE flags are present r=mcmanus
This commit is contained in:
Родитель
f91fdd7365
Коммит
74a360e504
|
@ -4857,10 +4857,13 @@ nsHttpChannel::BeginConnect()
|
|||
if (mLoadFlags & VALIDATE_ALWAYS || BYPASS_LOCAL_CACHE(mLoadFlags))
|
||||
mCaps |= NS_HTTP_REFRESH_DNS;
|
||||
|
||||
if (!mConnectionInfo->UsingHttpProxy()) {
|
||||
if (!mConnectionInfo->UsingHttpProxy() &&
|
||||
!(mLoadFlags & (LOAD_NO_NETWORK_IO | LOAD_ONLY_FROM_CACHE))) {
|
||||
// Start a DNS lookup very early in case the real open is queued the DNS can
|
||||
// happen in parallel. Do not do so in the presence of an HTTP proxy as
|
||||
// all lookups other than for the proxy itself are done by the proxy.
|
||||
// Also we don't do a lookup if the LOAD_NO_NETWORK_IO or
|
||||
// LOAD_ONLY_FROM_CACHE flags are set.
|
||||
//
|
||||
// We keep the DNS prefetch object around so that we can retrieve
|
||||
// timing information from it. There is no guarantee that we actually
|
||||
|
|
Загрузка…
Ссылка в новой задаче