1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 20:05:55 +00:00

fetch_file_contents: decompress gzipped data

af_readability: remove utf8 preamble hack
This commit is contained in:
Andrew Dolgov
2018-12-21 17:50:16 +03:00
parent 782eda45db
commit a5517fe857
3 changed files with 20 additions and 2 deletions

View File

@@ -437,6 +437,14 @@
curl_close($ch);
$is_gzipped = RSSUtils::is_gzipped($contents);
if ($is_gzipped) {
$tmp = @gzdecode($contents);
if ($tmp) $contents = $tmp;
}
return $contents;
} else {
@@ -522,6 +530,15 @@
return false;
}
$is_gzipped = RSSUtils::is_gzipped($data);
if ($is_gzipped) {
$tmp = @gzdecode($data);
if ($tmp) $data = $tmp;
}
return $data;
}