aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-26 19:13:23 +0100
committerGravatar GitHub <noreply@github.com> 2021-03-26 19:13:23 +0100
commiteeff1a17b0ae13c32560e9d1b59c6e82965f3e6d (patch)
tree8224f828f2d9ea094f2a8f608c0eb1eef07793b1 /app/Controllers/feedController.php
parent49f920e19dff22e8026707d98cf93b556a2703a9 (diff)
Suport standard HTTP 410 Gone (#3561)
When a feed returns an HTTP 410 Gone, mute the corresponding feed, i.e. stop refreshing it. Example of such feed, Les Décodeurs (Libération) https://rss.liberation.fr/rss/100893/
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 7daba4822..463aa25ed 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -349,6 +349,11 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
} catch (FreshRSS_Feed_Exception $e) {
Minz_Log::warning($e->getMessage());
$feedDAO->updateLastUpdate($feed->id(), true);
+ if ($e->getCode() === 410) {
+ // HTTP 410 Gone
+ Minz_Log::warning('Muting gone feed: ' . $feed->url(false));
+ $feedDAO->mute($feed->id(), true);
+ }
$feed->unlock();
continue;
}