A free, self-hostable news aggregator…
Fix HTTP GET curl options (#6492)
Alexandre Alapetite3cd90a2b1f1a
diff --git a/app/Models/Entry.php b/app/Models/Entry.phpindex ca8d9c602..ad480f3e6 100644--- a/app/Models/Entry.php+++ b/app/Models/Entry.php@@ -719,7 +719,7 @@ HTML;}$cachePath = $feed->cacheFilename($url . '#' . $feed->pathEntries());- $html = httpGet($url, $cachePath, 'html');+ $html = httpGet($url, $cachePath, 'html', $feed->attributes(), $feed->curlOptions());if (strlen($html) > 0) {$doc = new DOMDocument();$doc->loadHTML($html, LIBXML_NONET | LIBXML_NOERROR | LIBXML_NOWARNING);diff --git a/app/Models/Feed.php b/app/Models/Feed.phpindex 5450d78c6..625c3c931 100644--- a/app/Models/Feed.php+++ b/app/Models/Feed.php@@ -1058,6 +1058,7 @@ class FreshRSS_Feed extends Minz_Model {CURLOPT_MAXREDIRS => 10,CURLOPT_FOLLOWLOCATION => true,CURLOPT_ENCODING => '', //Enable all encodings+ //CURLOPT_VERBOSE => 1, // To debug sent HTTP headers]);$response = curl_exec($ch);$info = curl_getinfo($ch);diff --git a/lib/favicons.php b/lib/favicons.phpindex 8bfa8e001..53cc9f759 100644--- a/lib/favicons.php+++ b/lib/favicons.php@@ -38,6 +38,7 @@ function downloadHttp(string &$url, array $curlOptions = []): string {CURLOPT_MAXREDIRS => 10,CURLOPT_FOLLOWLOCATION => true,CURLOPT_ENCODING => '', //Enable all encodings+ //CURLOPT_VERBOSE => 1, // To debug sent HTTP headers]);FreshRSS_Context::initSystem();diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex 22da0b98e..6bceccc86 100644--- a/lib/lib_rss.php+++ b/lib/lib_rss.php@@ -544,6 +544,7 @@ function httpGet(string $url, string $cachePath, string $type = 'html', array $aCURLOPT_RETURNTRANSFER => true,CURLOPT_FOLLOWLOCATION => true,CURLOPT_ENCODING => '', //Enable all encodings+ //CURLOPT_VERBOSE => 1, // To debug sent HTTP headers]);curl_setopt_array($ch, FreshRSS_Context::systemConf()->curl_options);