Check openssl extension for proxy
parent
1471b41ba8
commit
3444bdae82
|
@ -64,6 +64,10 @@ abstract class FileDownloader implements DownloaderInterface
|
||||||
// http(s):// is not supported in proxy
|
// http(s):// is not supported in proxy
|
||||||
$proxy = str_replace(array('http://', 'https://'), array('tcp://', 'ssl://'), $_SERVER['HTTP_PROXY']);
|
$proxy = str_replace(array('http://', 'https://'), array('tcp://', 'ssl://'), $_SERVER['HTTP_PROXY']);
|
||||||
|
|
||||||
|
if (0 === strpos($proxy, 'ssl:') && !extension_loaded('openssl')) {
|
||||||
|
throw new \RuntimeException('You must enable the openssl extension to use a proxy over https');
|
||||||
|
}
|
||||||
|
|
||||||
$ctx = stream_context_create(array(
|
$ctx = stream_context_create(array(
|
||||||
'http' => array(
|
'http' => array(
|
||||||
'proxy' => $proxy,
|
'proxy' => $proxy,
|
||||||
|
|
Loading…
Reference in New Issue