MDL-33749 follow redirects for URL downloader

This commit is contained in:
Kevin Wiliarty
2012-07-04 08:34:55 +12:00
committed by Sam Hemelryk
parent 7df86db31d
commit e3f4094ac8
+1
View File
@@ -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) {