Skip to content
Snippets Groups Projects
Commit c2c2a361 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Merge pull request #316 from tvdijen/master

Minor optimalization - Don't gather settings if we don't use them
parents b34addd8 3a789947
No related branches found
No related tags found
No related merge requests found
...@@ -362,11 +362,11 @@ class HTTP ...@@ -362,11 +362,11 @@ class HTTP
$config = \SimpleSAML_Configuration::getInstance(); $config = \SimpleSAML_Configuration::getInstance();
$proxy = $config->getString('proxy', null); $proxy = $config->getString('proxy', null);
$proxy_auth = $config->getString('proxy.auth', false);
if ($proxy !== null) { if ($proxy !== null) {
if (!isset($context['http']['proxy'])) { if (!isset($context['http']['proxy'])) {
$context['http']['proxy'] = $proxy; $context['http']['proxy'] = $proxy;
} }
$proxy_auth = $config->getString('proxy.auth', false);
if ($proxy_auth !== false) { if ($proxy_auth !== false) {
$context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth); $context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment