Re: apache fastcgi module and gzip

Tim Wood <timwood0-yBeKhBN/[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <5.2.1.1.1.20050614114730.0234b380@mailhost>
At 12:27 AM 06/14/05, you wrote:
>Content-class: urn:content-classes:message
>Content-Type: multipart/alternative;
>        boundary="----_=_NextPart_001_01C570B2.85FCB8DC"
>
>Hi,
> 
>I wanted to know how to send gzipped html files back to the browser which are created by my fastcgi application on the fly?
> 
>I understand that to send static html files gzipped, I need to install mod_gzip module.

Basically you need to build an application/(g)zip MIME-type stream in your (F)CGI application at runtime, and point that stream back at the browser.  No need for a temporary file on the server, just write the data to the stream, and the stream packages it as a ZIP.  Search around for classes/modules that implement this (e.g. Java comes with ZipOutputFileStream, there're probably Perl modules, etc.)

The above is meant for downloaded files, not compression on the wire of ordinary HTML for display.  I'd be surprised if that's worth it since HTML pages usually run in the 100s of KB at most. 
 
TW

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.