MDL-33749 follow redirects for URL downloader
This commit is contained in:
committed by
Sam Hemelryk
parent
7df86db31d
commit
e3f4094ac8
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user