Permalink
Browse files

MDL-33749 follow redirects for URL downloader

  • Loading branch information...
1 parent 7df86db commit e3f4094ac826f3f3016b22b95ba84daee20dbc91 @kwiliarty kwiliarty committed with Sam Hemelryk Jun 19, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 repository/url/lib.php
View
@@ -127,6 +127,7 @@ protected function parse_file($baseurl, $relativeurl, &$list, $mainfile = false)
}
$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) {

0 comments on commit e3f4094

Please sign in to comment.