From 4a0b76690b2a0dbfe3365e9bb71886f41ef6a4e6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 27 Nov 2015 09:00:22 +0100 Subject: [PATCH] make sure zlib exists when trying to use gzip_output #1410 --- inc/httputils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/httputils.php b/inc/httputils.php index ac79aa1768..b2e2afe0fe 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -255,7 +255,7 @@ function http_cached_finish($file, $content) { if(function_exists('gzopen')) io_saveFile("$file.gz",$content); // finally send output - if ($conf['gzip_output']) { + if ($conf['gzip_output'] && function_exists('gzencode')) { header('Vary: Accept-Encoding'); header('Content-Encoding: gzip'); print gzencode($content,9,FORCE_GZIP);