Commit:    a11e8ce9bd9d7ed43218358809b74af4ee7dd6b4
Author:    Hannes Magnusson <[email protected]>         Tue, 3 Dec 2013 
23:22:14 -0800
Parents:   9b1c374d0dcd9552c08abe2143718b90adc72b3d
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=a11e8ce9bd9d7ed43218358809b74af4ee7dd6b4

Log:
Enable compression on all pages

Dear god. How come I always thought this setting was PHP_INI_SYSTEM?!??!
And why has noone ever done this before?

Changed paths:
  M  cached.php
  M  include/prepend.inc


Diff:
diff --git a/cached.php b/cached.php
index e94a196..99cda6a 100644
--- a/cached.php
+++ b/cached.php
@@ -37,12 +37,6 @@ if (substr($abs, -3) == ".js" || substr($abs, -5) == 
".json") {
     header("Content-Type: text/css");
 }
 
-if (function_exists("ob_gzhandler")) {
-    ob_start("ob_gzhandler");
-    readfile($abs);
-    ob_end_flush();
-} else {
-    readfile($abs);
-}
+readfile($abs);
 
 
diff --git a/include/prepend.inc b/include/prepend.inc
index 80b09bb..a98e697 100644
--- a/include/prepend.inc
+++ b/include/prepend.inc
@@ -1,4 +1,6 @@
 <?php // -*- C++ -*-
+// Compress all pages, if ext/zlib is available on the mirror
+ini_set("zlib.output_compression", 1);
 
 // $Id$


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to