From c713414319b3e58df5000a66b265936e9e552be0 Mon Sep 17 00:00:00 2001 From: Aparup Banerjee Date: Tue, 14 May 2013 13:23:14 +0800 Subject: [PATCH] MDL-39664 added http redirect limitation to 5. rephrased certificate use in message log. --- mdeploy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdeploy.php b/mdeploy.php index 5f34e9759a2..e58f16b8864 100644 --- a/mdeploy.php +++ b/mdeploy.php @@ -1054,6 +1054,7 @@ class worker extends singleton_pattern { 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, @@ -1061,7 +1062,7 @@ class worker extends singleton_pattern { $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);