OSDN Git Service

if(defined('PKWK_ZLIB_LOADABLE_MODULE'))
authorhenoheno <henoheno>
Wed, 26 Jan 2005 13:26:37 +0000 (22:26 +0900)
committerhenoheno <henoheno>
Wed, 26 Jan 2005 13:26:37 +0000 (22:26 +0900)
lib/html.php

index aafb63a..35ab9dd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: html.php,v 1.26 2005/01/12 14:02:36 henoheno Exp $
+// $Id: html.php,v 1.27 2005/01/26 13:26:37 henoheno Exp $
 //
 // HTML-publishing related functions
 
@@ -380,11 +380,15 @@ function pkwk_common_headers()
 {
        if (! PKWK_OPTIMISE) pkwk_headers_sent();
 
-       $matches = array();
-       if(ini_get('zlib.output_compression') &&
-           preg_match('/\b(gzip|deflate)\b/i', $_SERVER['HTTP_ACCEPT_ENCODING'], $matches)) {
-               header('Content-Encoding: ' . $matches[1]);
-               header('Vary: Accept-Encoding');
+       if(defined('PKWK_ZLIB_LOADABLE_MODULE')) {
+               $matches = array();
+               if(ini_get('zlib.output_compression') &&
+                   preg_match('/\b(gzip|deflate)\b/i', $_SERVER['HTTP_ACCEPT_ENCODING'], $matches)) {
+                       // Bug #29350 output_compression compresses everything _without header_ as loadable module
+                       // http://bugs.php.net/bug.php?id=29350
+                       header('Content-Encoding: ' . $matches[1]);
+                       header('Vary: Accept-Encoding');
+               }
        }
 }