Browse files

MDL-39664 added http redirect limitation to 5. rephrased certificate …

…use in message log.
  • Loading branch information...
1 parent 6053036 commit c713414319b3e58df5000a66b265936e9e552be0 @nebgor nebgor committed May 14, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 mdeploy.php
View
3 mdeploy.php
@@ -1054,14 +1054,15 @@ protected function download_file($source, $target) {
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); // nah, moodle.org is never unavailable! :-p
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // Allow redirection, we trust in ssl.
+ curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
if ($cacertfile = $this->get_cacert()) {
// Do not use CA certs provided by the operating system. Instead,
// use this CA cert to verify the ZIP provider.
$this->log('Using custom CA certificate '.$cacertfile);
curl_setopt($ch, CURLOPT_CAINFO, $cacertfile);
} else {
- $this->log('Warning: '.$cacertfile.' not found');
+ $this->log('Using operating system CA certificates.');
}
$proxy = $this->input->get_option('proxy', false);

0 comments on commit c713414

Please sign in to comment.