From: Mikael Nordfeldth Date: Mon, 1 May 2017 08:27:21 +0000 (+0200) Subject: I think this will stop my daemons from endlessly looping X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f6d4d00e024b9874cc9ceb6b2ef5bc6c2c3a341d;p=quix0rs-gnu-social.git I think this will stop my daemons from endlessly looping I got this which ate all my memory: queuedaemon.php:10733] HTTPClient: HTTP HEAD https://drive.google.com/file/d/*masked*/view?usp=sharing - 200 OK queuedaemon.php:10733] Checking for remote URL metadata for https://drive.google.com/file/d/*masked*/view?usp=sharing queuedaemon.php:10733] HTTPClient: HTTP GET https://drive.google.com/file/d/*masked*/view?usp=sharing - 200 OK queuedaemon.php:10733] Trying to discover an oEmbed endpoint using link headers. queuedaemon.php:10733] Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML. queuedaemon.php:10733] HTTPClient: HTTP HEAD https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook - 200 OK queuedaemon.php:10733] Checking for remote URL metadata for https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook queuedaemon.php:10733] HTTPClient: HTTP GET https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook - 200 OK queuedaemon.php:10733] Trying to discover an oEmbed endpoint using link headers. queuedaemon.php:10733] Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML. queuedaemon.php:10733] HTTPClient: HTTP HEAD https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook&usp=embed_facebook - 200 OK queuedaemon.php:10733] Checking for remote URL metadata for https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook&usp=embed_facebook queuedaemon.php:10733] HTTPClient: HTTP GET https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook&usp=embed_facebook - 200 OK queuedaemon.php:10733] Trying to discover an oEmbed endpoint using link headers. queuedaemon.php:10733] Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML. ...ad nauseam. --- diff --git a/plugins/Oembed/classes/File_oembed.php b/plugins/Oembed/classes/File_oembed.php index 95aa91ff4c..38a1754ae2 100644 --- a/plugins/Oembed/classes/File_oembed.php +++ b/plugins/Oembed/classes/File_oembed.php @@ -124,7 +124,8 @@ class File_oembed extends Managed_DataObject $file = File::getByUrl($given_url); $file_oembed->mimetype = $file->mimetype; } catch (NoResultException $e) { - $redir = File_redirection::where($given_url); + // File_redirection::where argument 'discover' is false to avoid loops + $redir = File_redirection::where($given_url, false); if (empty($redir->file_id)) { $f = $redir->getFile(); $file_oembed->mimetype = $f->mimetype;