summaryrefslogtreecommitdiffstats
path: root/netwerk/base/nsProtocolProxyService.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-02-07 12:58:13 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-02-07 12:58:13 +0100
commit6567bb631a78033b6b4cc32bc93e07d837652276 (patch)
tree667a6cf15697f4b6343dc082eae591433db994ed /netwerk/base/nsProtocolProxyService.cpp
parent2b1ccf227b8f409e0572119018c7615b877a6612 (diff)
downloadUXP-6567bb631a78033b6b4cc32bc93e07d837652276.tar
UXP-6567bb631a78033b6b4cc32bc93e07d837652276.tar.gz
UXP-6567bb631a78033b6b4cc32bc93e07d837652276.tar.lz
UXP-6567bb631a78033b6b4cc32bc93e07d837652276.tar.xz
UXP-6567bb631a78033b6b4cc32bc93e07d837652276.zip
Never let "localhost" get sent to a proxy.
Also make "No proxy for" editable always when usable.
Diffstat (limited to 'netwerk/base/nsProtocolProxyService.cpp')
-rw-r--r--netwerk/base/nsProtocolProxyService.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/netwerk/base/nsProtocolProxyService.cpp b/netwerk/base/nsProtocolProxyService.cpp
index 26eca0e88..237a2a3bd 100644
--- a/netwerk/base/nsProtocolProxyService.cpp
+++ b/netwerk/base/nsProtocolProxyService.cpp
@@ -1841,6 +1841,13 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel,
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 &&