Bug 1260407 - added logging for proxy/pac to aid debugging, r=mcmanus

This commit is contained in:
Daniel Stenberg
2016-03-29 05:23:00 +02:00
parent e93e5c7140
commit 168df8cf50
2 changed files with 25 additions and 2 deletions

View File

@@ -216,12 +216,16 @@ private:
void DoCallback()
{
bool pacAvailable = true;
if (mStatus == NS_ERROR_NOT_AVAILABLE && !mProxyInfo) {
// If the PAC service is not avail (e.g. failed pac load
// or shutdown) then we will be going direct. Make that
// mapping now so that any filters are still applied.
mPACString = NS_LITERAL_CSTRING("DIRECT;");
mStatus = NS_OK;
LOG(("pac not available, use DIRECT\n"));
pacAvailable = false;
}
// Generate proxy info from the PAC string if appropriate
@@ -239,7 +243,10 @@ private:
else
mProxyInfo = nullptr;
LOG(("pac thread callback %s\n", mPACString.get()));
if(pacAvailable) {
// if !pacAvailable, it was already logged above
LOG(("pac thread callback %s\n", mPACString.get()));
}
if (NS_SUCCEEDED(mStatus))
mPPS->MaybeDisableDNSPrefetch(mProxyInfo);
mCallback->OnProxyAvailable(this, mChannel, mProxyInfo, mStatus);