diff options
Diffstat (limited to 'inc/render.inc.php')
-rw-r--r-- | inc/render.inc.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/inc/render.inc.php b/inc/render.inc.php index 4318a95..c606fd8 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -32,10 +32,10 @@ class Render /** * Output the buffered, generated page */ - public static function output() + public static function output(): void { Header('Content-Type: text/html; charset=utf-8'); - $zip = isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false); + $zip = isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (str_contains($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')); if ($zip) ob_start(); echo @@ -74,8 +74,7 @@ class Render ob_implicit_flush(false); $gzip_contents = ob_get_contents(); ob_end_clean(); - echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; - echo substr(gzcompress($gzip_contents, 5), 0, -4); + echo gzcompress($gzip_contents, 5, ZLIB_ENCODING_GZIP); } } |