On Thu, 16 Aug 2001 07:44:50 +0200, "John Donagher" <[EMAIL PROTECTED]>

> 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

- Oh, and please:
Could someone take a look at this bug which I really think is serious:

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);

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

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to