Skip to content

Commit

Permalink
Fix HTTP GET curl options (FreshRSS#6492)
Browse files Browse the repository at this point in the history
fix FreshRSS#6491
Regression from FreshRSS#6177
  • Loading branch information
Alkarex committed May 25, 2024
1 parent 3e7054b commit 3cd90a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ public function getContentByParsing(string $url = '', int $maxRedirs = 3): strin
}

$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);
Expand Down
1 change: 1 addition & 0 deletions app/Models/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ public function pubSubHubbubSubscribe(bool $state): bool {
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);
Expand Down
1 change: 1 addition & 0 deletions lib/favicons.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions lib/lib_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ function httpGet(string $url, string $cachePath, string $type = 'html', array $a
CURLOPT_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);
Expand Down

0 comments on commit 3cd90a2

Please sign in to comment.