aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-07-31 09:17:42 +0200
committerGravatar GitHub <noreply@github.com> 2025-07-31 09:17:42 +0200
commit7a0c423357818b19eb431775452b1357bc7fd3eb (patch)
tree5afd0d95b1af8a5262a305467951449c2a645197 /app/Controllers/feedController.php
parente33ef74af9ff2f8ba1c6909b78ee07633cff240a (diff)
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
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php6
1 files changed, 4 insertions, 2 deletions
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;