Re: [PHP4BETA] Output compression
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: [PHP4BETA] Output compression | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6185@lists.php.net to get a copy of this message | ||
> 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.
4) Do it in a reverse proxy in front of your server
5) Create a IO Layer (IOL) for Apache2 to do it
These are both architecturally more correct ways of achieving
this. PHP is not the right place to do it.
-Rasmus