]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
I think this will stop my daemons from endlessly looping
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 1 May 2017 08:27:21 +0000 (10:27 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 1 May 2017 08:27:21 +0000 (10:27 +0200)
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.

plugins/Oembed/classes/File_oembed.php

index 95aa91ff4c5ab29da0808c125c3a5b7ffc0e7cd9..38a1754ae29c9ebdc62b4950cc13119f48911d7d 100644 (file)
@@ -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;