Re: [PHP4BETA] Output compression
| From: | Sascha Schumann | Date: | Sat, 13 Nov 1999 14:58:09 +0000 |
| Subject: | Re: [PHP4BETA] Output compression | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6180@lists.php.net to get a copy of this message | ||
On Sat, Nov 13, 1999 at 03:25:53PM +0100, Christian Schneider wrote:
> A while ago I implemented Content-encoding: gzip compression for php (that was
> back in 3.06 and 3.1 days) which never made it into the distribution. I was
> thinking about reimplementing it for php4.
> I looked into the SAPI/ext mechanism but it doesn't really fit in there as I
> need to act as a filter between the core and the SAPI module, not replace the
> SAPI module.
> I can think of three approaches:
> 1) Don't touch core code and wedge into SAPI output functions at module
> initialization (Problem: Get request-specific context to store compression
> state.)
> 2) Hack it into the low-level output functions (that's what I did the first
> time).
> 3) Extend SAPI or add a Filter mechanism where output filters can register to.
>
> I looked into 1) because I wanted to avoid changing the core code but ran into
> problems with where to store compression context. Solution 3) would be the
> cleanest but I didn't work at the PHP4 code quite a while. Maybe someone else
> has a better overview over the code and can tell me if it would be feasible/easy
> to do.
A general filter mechanism would be nice. The session module
is already able to filter and convert URLs in pages. See
ext/standard/output.c.
--
Regards,
Sascha Schumann
Consultant