Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-33749 follow redirects for URL downloader

  • Loading branch information...
commit 78dd6d4813baab8b170c8d17fe4190d6a7a8f3c8 1 parent ec7a8c3
@kwiliarty kwiliarty authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  repository/url/lib.php
View
1  repository/url/lib.php
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.