Re: Output Compression Issues

From: Date: Thu, 16 Aug 2001 11:55:10 +0000
Subject: Re: Output Compression Issues
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63419@lists.php.net to get a copy of this message
On Thu, 16 Aug 2001 07:44:50 +0200, "John Donagher" <john@webmeta.com> wrote: > So, we really want to disable output compression when we are serving > anything but HTML/text. I agree on that. I have heard that some older versions of both major browsers have trouble with compressed non-HTML content. - Or perhaps the ob_gzhandler could be given an argument telling it to be conservative or not? - Oh, and please: Could someone take a look at this bug which I really think is serious: http://www.php.net/bugs.php?id=12631 As written, it's currently not possible to send proper Content-Length headers along with gz-encoded PHP-output because it's not possible to get the correct output-length information when using the gzhandler. When Content-Lengh headers are not sent, then Apache is not capable of using keep-alive == worse performance. There are lines like this in zlib.c: #if 0 } else { char lenbuf[64]; sprintf(lenbuf,"Content-Length: %d",Z_STRLEN_P(return_value)); sapi_add_header(lenbuf,strlen(lenbuf), 1); #endif What does "#if 0" actually mean? If it's too hard to change the output buffering system to return proper content lengths, maybe it would be an idea to be able to tell ob_end_flush() that you want a Content-Length header to be sent along? (It seems that ob_gzhandler knows the correct Content-Length but is unable to pass that information along to the output buffering system.) -- Greetings from Troels Arvin, Copenhagen, Denmark

« previous php.dev (#63419) next »