Permalink
Browse files

MDL-33749 follow redirects for URL downloader

Conflicts:

	repository/url/lib.php
  • Loading branch information...
1 parent 5686145 commit ca6141c264fcc2ce74748f75233a770c0f57cd37 @kwiliarty kwiliarty committed with Sam Hemelryk Jun 19, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 repository/url/lib.php
View
@@ -98,6 +98,7 @@ public function get_listing($path='', $page='') {
global $CFG, $OUTPUT;
$ret = array();
$curl = new curl;
+ $curl->setopt(array('CURLOPT_FOLLOWLOCATION' => true, 'CURLOPT_MAXREDIRS' => 3));
$msg = $curl->head($this->file_url);
$info = $curl->get_info();
if ($info['http_code'] != 200) {

0 comments on commit ca6141c

Please sign in to comment.