bug 1503393 - never let "localhost" get sent to a proxy r=mayhemer

This commit is contained in:
Daniel Stenberg 2018-12-03 16:27:11 +02:00
Родитель 2768da18cb
Коммит d7d436dea8
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -2032,6 +2032,12 @@ nsresult nsProtocolProxyService::Resolve_Internal(nsIChannel *channel,
// here means that we will not use a proxy for this connection.
if (mPACMan && mPACMan->IsPACURI(uri)) return NS_OK;
// if proxies are enabled and this host:port combo is supposed to use a
// proxy, check for a proxy.
if ((mProxyConfig == PROXYCONFIG_DIRECT) ||
!CanUseProxy(uri, info.defaultPort))
return NS_OK;
bool mainThreadOnly;
if (mSystemProxySettings && mProxyConfig == PROXYCONFIG_SYSTEM &&
NS_SUCCEEDED(mSystemProxySettings->GetMainThreadOnly(&mainThreadOnly)) &&