From 7a0c423357818b19eb431775452b1357bc7fd3eb Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 31 Jul 2025 09:17:42 +0200 Subject: Implement support for HTTP 429 Too Many Requests (#7760) * Implement support for HTTP 429 Too Many Requests Will obey the corresponding HTTP `Retry-After` header at domain level. * Implement 503 Service Unavailable * Sanitize Retry-After * Reduce default value when Retry-After is absent And make configuration parameter * Retry-After also for favicons --- app/Controllers/feedController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 2aae5a0a8..a080d5e67 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -83,7 +83,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { switch ($kind) { case FreshRSS_Feed::KIND_RSS: case FreshRSS_Feed::KIND_RSS_FORCED: - $feed->load(true); //Throws FreshRSS_Feed_Exception, Minz_FileNotExistException + if ($feed->load(loadDetails: true) === null) { // Throws FreshRSS_Feed_Exception, Minz_FileNotExistException + throw new FreshRSS_FeedNotAdded_Exception($url); + } break; case FreshRSS_Feed::KIND_HTML_XPATH: case FreshRSS_Feed::KIND_XML_XPATH: @@ -345,7 +347,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $this->view->feed = new FreshRSS_Feed($url); try { // We try to get more information about the feed. - $this->view->feed->load(true); + $this->view->feed->load(loadDetails: true); $this->view->load_ok = true; } catch (Exception) { $this->view->load_ok = false; -- cgit v1.2.3