|
|
@@ -229,6 +229,24 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
|
|
|
curl_setopt($curlResource, CURLOPT_RETURNTRANSFER, true);
|
|
|
curl_setopt($curlResource, CURLOPT_SSL_VERIFYPEER, true);
|
|
|
curl_setopt($curlResource, CURLOPT_SSL_VERIFYHOST, 2);
|
|
|
+
|
|
|
+ $curl_options = [];
|
|
|
+ if (defined('CURLOPT_PROTOCOLS_STR')) {
|
|
|
+ $curl_options[CURLOPT_PROTOCOLS_STR] = 'http,https';
|
|
|
+ if (defined('CURLOPT_REDIR_PROTOCOLS_STR')) {
|
|
|
+ $curl_options[CURLOPT_REDIR_PROTOCOLS_STR] = 'http,https';
|
|
|
+ }
|
|
|
+ } elseif (defined('CURLPROTO_HTTP') && defined('CURLPROTO_HTTPS')) {
|
|
|
+ // Legacy PHP 8.2-
|
|
|
+ if (defined('CURLOPT_PROTOCOLS')) {
|
|
|
+ $curl_options[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
|
|
|
+ }
|
|
|
+ if (defined('CURLOPT_REDIR_PROTOCOLS')) {
|
|
|
+ $curl_options[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ curl_setopt_array($curlResource, $curl_options);
|
|
|
+
|
|
|
$result = curl_exec($curlResource);
|
|
|
$curlGetinfo = curl_getinfo($curlResource, CURLINFO_HTTP_CODE);
|
|
|
$curlError = curl_error($curlResource);
|