Scott Sanders
sanders at apache.org
Thu Aug 12 11:20:17 EDT 2004
I have implemented and documented a simple way to do this at: http://dotnot.org/blog/archives/2004/02/10/provide-gzip-for-my- apachephp-based-blog/ Scott On Aug 12, 2004, at 10:03 AM, Gregory (Grisha) Trubetskoy wrote: > > On Thu, 12 Aug 2004, Jim Dabell wrote: >> >> Unfortunately, that just repeatedly calls req.write(), which doesn't >> give me >> the opportunity to perform any operations on the result before it is >> sent to >> the client, or even output additional headers afterwards. For >> instance, I >> can't find a way of producing a Content-Length header, or using >> content >> encoding to gzip the response body. > > You shouldn't need to set content length because it will be set by > Apache for you. Apache will decide wither to set it depending on the > protocol version used and whether the client accepts chunked encoding. > > If you want to gzip the response, the proper way to do this in Apache > 2.0 would be by implementing a filter rather than a handler, there is > actually an example of how to do this in mod_python in the examples > directory, though you will probably be better off using something like > mod_gzip. > > Grisha > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|