diff options
author | Andrew Dolgov <[email protected]> | 2008-05-20 07:01:19 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-05-20 07:01:19 +0100 |
commit | 04fedbf587995bd029d345994f1c35130b8963b1 (patch) | |
tree | 46f49b0b06463426f086d0087671c6d16455f81f | |
parent | ee8768dbbbf5820e9d37a7ff7a834d37021fcac7 (diff) |
new option: ENABLE_GZIP_OUTPUT
-rw-r--r-- | backend.php | 7 | ||||
-rw-r--r-- | config.php-dist | 6 | ||||
-rw-r--r-- | sanity_check.php | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/backend.php b/backend.php index e5ccd2b77..a85351d8a 100644 --- a/backend.php +++ b/backend.php @@ -63,7 +63,12 @@ if ((!$op || $op == "rpc" || $op == "rss" || $op == "view" || $op == "digestSend" || $op == "viewfeed" || $op == "publish" || $op == "globalUpdateFeeds") && !$_REQUEST["noxml"]) { - header("Content-Type: application/xml; charset=utf-8"); + header("Content-Type: application/xml; charset=utf-8"); + + if (ENABLE_GZIP_OUTPUT) { + ob_start("ob_gzhandler"); + } + } else { if (!$_REQUEST["noxml"]) { header("Content-Type: text/html; charset=utf-8"); diff --git a/config.php-dist b/config.php-dist index 52950f80b..1694059d5 100644 --- a/config.php-dist +++ b/config.php-dist @@ -180,7 +180,11 @@ // Allow users to select the library to update feeds with - e.g. // Magpie or SimplePie - define('CONFIG_VERSION', 15); + define('ENABLE_GZIP_OUTPUT', false); + // Selectively gzip output to improve wire performance. This requires + // PHP Zlib extension on the server. + + define('CONFIG_VERSION', 16); // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). diff --git a/sanity_check.php b/sanity_check.php index 1fca50c2a..41fdf983a 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -1,7 +1,7 @@ <?php require_once "functions.php"; - define('EXPECTED_CONFIG_VERSION', 15); + define('EXPECTED_CONFIG_VERSION', 16); define('SCHEMA_VERSION', 37); if (!file_exists("config.php")) { |