From e3f4094ac826f3f3016b22b95ba84daee20dbc91 Mon Sep 17 00:00:00 2001 From: Kevin Wiliarty Date: Tue, 19 Jun 2012 14:14:49 -0400 Subject: [PATCH] MDL-33749 follow redirects for URL downloader --- repository/url/lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/repository/url/lib.php b/repository/url/lib.php index 20725c81f23..ba247ff7611 100644 --- a/repository/url/lib.php +++ b/repository/url/lib.php @@ -127,6 +127,7 @@ EOD; } $this->processedfiles[] = $url; $curl = new curl; + $curl->setopt(array('CURLOPT_FOLLOWLOCATION' => true, 'CURLOPT_MAXREDIRS' => 3)); $msg = $curl->head($url); $info = $curl->get_info(); if ($info['http_code'] != 200) {