[mod_python] PSP buffer?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Aug 12 16:05:04 EDT 2004


On Thu, 12 Aug 2004, Jim Dabell wrote:

> I was really hoping for a clean way of getting the result of a PSP 
> instead of it being automatically sent to the client; I'd rather not 
> split my script up if it's not necessary.
>
> I'd use this buffer for such things as:
>
> * Generating an etag header based upon the template result.
>
> * Generating a header that showed how long the template transformation took.
>
> * Running the result through HTML Tidy.
>
> * Converting to XHTML where acceptable.
>
> * Providing a Content-MD5 header.
>
> Sure, all of these things can be hacked around, separated into filters or
> placed into templates, I just don't see the point when an output buffer would
> give a clean way of doing all this in a single handler, and I could leave the
> templates to simply be templates.

Well - I'm not sure what would be aclean way to make a PSP buffer 
available, short of implementing some sort of a filter hook - but what's 
the point if Apache already has one. But if you get any cool ideas, please 
do share it with the list, this is an interesting point.

Grisha


More information about the Mod_python mailing list