From b037ffd628b62a68c9aceb4726d7e8d58b47b89c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 25 May 2018 14:35:33 +0300 Subject: [PATCH] af_readability: specify http accept header --- plugins/af_readability/init.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 8e420bfe..2d08a621 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -141,7 +141,10 @@ class Af_Readability extends Plugin { if (!class_exists("Readability")) require_once(dirname(dirname(__DIR__)). "/lib/readability/Readability.php"); - $tmp = fetch_file_contents(array("url" => $url, "type" => "text/html")); + $tmp = fetch_file_contents([ + "url" => $url, + "http_accept" => "text/*", + "type" => "text/html"]); if ($tmp && mb_strlen($tmp) < 1024 * 500) { $tmpdoc = new DOMDocument("1.0", "UTF-8"); -- 2.39.5