Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22087 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7971 invoked by uid 1010); 2 Mar 2006 18:24:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7954 invoked from network); 2 Mar 2006 18:24:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2006 18:24:13 -0000 X-Host-Fingerprint: 80.123.98.46 unknown Received: from ([80.123.98.46:1029] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id D3/66-37756-B4837044 for ; Thu, 02 Mar 2006 13:24:11 -0500 Message-ID: To: internals@lists.php.net Date: Thu, 02 Mar 2006 19:24:09 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <68.AB.30574.5C7E2044@pb1.pair.com> <7.0.1.0.2.20060228183807.0afb5068@zend.com> <7f3ed2c30602280858q1253487bqade24d8d92aa4cb0@mail.gmail.com> <7.0.1.0.2.20060228190317.0b522678@zend.com> In-Reply-To: <7.0.1.0.2.20060228190317.0b522678@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.123.98.46 Subject: Re: [PHP-DEV] Revisiting output control code From: mike@php.net (Michael Wallner) Zeev Suraski wrote: > I misread the post, I thought we were talking about ob_end_clean(). > Yes, ob_clean() may cause this problem to happen, but again, the right > approach would be having an 'applicative' output buffer on top of the > gzip output buffer. We can look into letting output handlers denote > that ob_clean() is not allowed on them. This would be in deed an option. If you still consider a rather fundamental enhancement of the output control code, please take a look at my initial try. It already /seems to work/ but probably misses a few things. I must admit though, that I did not fully understand the current implementation. Considered issues: Support of contexts for internal output handlers that had to maintain it in a global variable, which caused those handlers being only usable once; while often natural, like for the gz handler, still a limitation. Conflict handlers, so that one doesn't need to incorporate that code directly in output.c, but register them from within an extension etc. Distinct ops, like FLUSH and CLEAN to signal the handler what's going on; there should also be a possibility to change the abilities of a handler in runtime, which is not implemented yet, eg. the gz handler could remove the CLEANABLE and REMOVABLE flags when the first output did pass through it. Unfortunately I don't know which version of re2c Ilia used to generate the url scanner, so a big part of the diff is pretty useless; note that the patch is against current 5_1 CVS. http://dev.iworks.at/PATCHES/ob.patch.txt.gz http://dev.iworks.at/PATCHES/output.c.txt http://dev.iworks.at/PATCHES/php_output.h.txt Thanks a lot, -- Michael - http://dev.iworks.at/ext-http/http-functions.html.gz