From eeff1a17b0ae13c32560e9d1b59c6e82965f3e6d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 26 Mar 2021 19:13:23 +0100 Subject: Suport standard HTTP 410 Gone (#3561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/ --- app/Models/Feed.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index af9c54719..51d63ef42 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -287,7 +287,8 @@ class FreshRSS_Feed extends Minz_Model { if ((!$mtime) || $simplePie->error()) { $errorMessage = $simplePie->error(); throw new FreshRSS_Feed_Exception( - ($errorMessage == '' ? 'Unknown error for feed' : $errorMessage) . ' [' . $this->url . ']' + ($errorMessage == '' ? 'Unknown error for feed' : $errorMessage) . ' [' . $this->url . ']', + $simplePie->status_code() ); } -- cgit v1.2.3