Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22037 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8380 invoked by uid 1010); 28 Feb 2006 16:45:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8363 invoked from network); 28 Feb 2006 16:45:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2006 16:45:33 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:16402] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id D0/B6-25426-B2E74044 for ; Tue, 28 Feb 2006 11:45:32 -0500 Received: (qmail 20845 invoked from network); 28 Feb 2006 16:45:27 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 28 Feb 2006 16:45:27 -0000 Message-ID: <7.0.1.0.2.20060228183807.0afb5068@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Tue, 28 Feb 2006 18:45:27 +0200 To: Michael Wallner Cc: internals@lists.php.net In-Reply-To: <68.AB.30574.5C7E2044@pb1.pair.com> References: <68.AB.30574.5C7E2044@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Revisiting output control code From: zeev@zend.com (Zeev Suraski) At 13:51 27/02/2006, Michael Wallner wrote: >Hi, > >I'd like to suggest that we revisit the output control (output >buffering) code base. >The current implementation uses way too less commands to do too many different >operations, which almost always causes problems with output handlers that need >to maintain a state or context. > >Short example: >ob_clean() causes havoc with ext/zlib ob handlers and any handlers >found in pecl/http. >ob_clean() passes currently buffered input through the handler and >discards it, which >means in the case of the gz handler that the gzip/zlib header bytes >(and more) are >missing from the sent data. Why would you call ob_end_clean() in those cases? It seems to me that what you want to do is actually create another layer of output buffering on top of those custom output handlers, if you want to control the contents itself. If you think of custom output buffers as a filter, then it makes perfect sense that calling ob_end_clean() would cause problems. If you do it in another layer of output buffering, then the format of zlib/gz will remain intact without any problems. I'm also not sure about what you're saying with the gzip/zlib headers missing - do you mean the footers? Zeev