From: Reini U. <ru...@us...> - 2005-09-18 15:16:01
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29088 Modified Files: IniConfig.php Request.php prepend.php Log Message: add a proper Content-Encoding: gzip if compressed, and omit Content-Length then. Index: IniConfig.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/IniConfig.php,v retrieving revision 1.94 retrieving revision 1.95 diff -u -2 -b -p -d -r1.94 -r1.95 --- IniConfig.php 15 Sep 2005 05:56:12 -0000 1.94 +++ IniConfig.php 18 Sep 2005 15:15:53 -0000 1.95 @@ -246,5 +246,7 @@ function IniConfig($file) { 'ALLOW_IMAP_LOGIN', 'ALLOW_USER_LOGIN', 'REQUIRE_SIGNIN_BEFORE_EDIT', - 'WIKIDB_NOCACHE_MARKUP'))) + 'WIKIDB_NOCACHE_MARKUP', + 'COMPRESS_OUTPUT' + ))) { ; @@ -851,4 +853,7 @@ function fixup_dynamic_configs($file) { // $Log$ +// Revision 1.95 2005/09/18 15:15:53 rurban +// add a proper Content-Encoding: gzip if compressed, and omit Content-Length then. +// // Revision 1.94 2005/09/15 05:56:12 rurban // read configurator desc from config-dist.ini, update desc, fix some warnings Index: Request.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/Request.php,v retrieving revision 1.97 retrieving revision 1.98 diff -u -2 -b -p -d -r1.97 -r1.98 --- Request.php 14 Sep 2005 05:58:17 -0000 1.97 +++ Request.php 18 Sep 2005 15:15:53 -0000 1.98 @@ -367,4 +367,8 @@ class Request { if ($compress) { ob_start('ob_gzhandler'); + + // dont send a length or get the gzipp'ed data length. + $this->_is_compressing_output = true; + header("Content-Encoding: gzip"); /* * Attempt to prevent Apache from doing the dreaded double-gzip. @@ -383,4 +387,5 @@ class Request { // FIXME: change the name of this method. ob_start(); + $this->_is_compressing_output = false; } $this->_is_buffering_output = true; @@ -442,5 +447,7 @@ class Request { } else { */ - if (!headers_sent()) { + // if _is_compressing_output then ob_get_length() returns + // the uncompressed length, not the gzip'ed as required. + if (!headers_sent() and ! $this->_is_compressing_output) { if (empty($this->_do_chunked_output)) { $this->_ob_get_length = ob_get_length(); @@ -1337,4 +1344,7 @@ class HTTP_ValidatorSet { // $Log$ +// Revision 1.98 2005/09/18 15:15:53 rurban +// add a proper Content-Encoding: gzip if compressed, and omit Content-Length then. +// // Revision 1.97 2005/09/14 05:58:17 rurban // protect against Content-Length if headers_sent(), fixed writing unwanted accesslog sql entries Index: prepend.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/prepend.php,v retrieving revision 1.43 retrieving revision 1.44 diff -u -2 -b -p -d -r1.43 -r1.44 --- prepend.php 14 Sep 2005 06:06:43 -0000 1.43 +++ prepend.php 18 Sep 2005 15:15:53 -0000 1.44 @@ -13,5 +13,5 @@ rcs_id('$Id$'); // see lib/stdlib.php: phpwiki_version() -define('PHPWIKI_VERSION', '1.3.11p1'); +define('PHPWIKI_VERSION', '1.3.12pre-20050918'); /** |