Skip to content
Snippets Groups Projects
Commit 88d51932 authored by restena-sw's avatar restena-sw
Browse files

Update HTTP.php

parent eb95a83e
No related branches found
No related tags found
No related merge requests found
......@@ -336,7 +336,8 @@ class HTTP
/**
* Helper function to retrieve a file or URL with proxy support.
* Helper function to retrieve a file or URL with proxy support, also
* supporting proxy basic authorization..
*
* An exception will be thrown if we are unable to retrieve the data.
*
......@@ -361,10 +362,14 @@ 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;
}
if ($proxy_auth !== false) ) {
$context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth);
}
if (!isset($context['http']['request_fulluri'])) {
$context['http']['request_fulluri'] = true;
}
......
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