From 3a789947bd7d65a652f8688148979798ac694a64 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Tue, 19 Jan 2016 16:46:53 +0100 Subject: [PATCH] Minor optimalization - Don't gather settings if we don't use them Don't gather the proxy.auth setting if we don't use it --- lib/SimpleSAML/Utils/HTTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SimpleSAML/Utils/HTTP.php b/lib/SimpleSAML/Utils/HTTP.php index ee5882581..5f791def7 100644 --- a/lib/SimpleSAML/Utils/HTTP.php +++ b/lib/SimpleSAML/Utils/HTTP.php @@ -362,11 +362,11 @@ class HTTP $config = \SimpleSAML_Configuration::getInstance(); $proxy = $config->getString('proxy', null); - $proxy_auth = $config->getString('proxy.auth', false); if ($proxy !== null) { if (!isset($context['http']['proxy'])) { $context['http']['proxy'] = $proxy; } + $proxy_auth = $config->getString('proxy.auth', false); if ($proxy_auth !== false) { $context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth); } -- GitLab