);
}
+ if (empty($errors) && ! CRM_Utils_HttpClient::singleton()->isRedirectSupported()) {
+ CRM_Core_Session::setStatus(ts('WARNING: The downloader may be unable to download files which require HTTP redirection. This may be a configuration issue with PHP\'s open_basedir or safe_mode.'));
+ CRM_Core_Error::debug_log_message('WARNING: The downloader may be unable to download files which require HTTP redirection. This may be a configuration issue with PHP\'s open_basedir or safe_mode.');
+ }
+
return $errors;
}
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
curl_setopt($ch, CURLOPT_VERBOSE, 0);
- if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ if ($this->isRedirectSupported()) {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
}
if ($this->connectionTimeout !== NULL) {
return array($ch, $caConfig);
}
+ public function isRedirectSupported() {
+ return ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off';
+ }
+
}