[mod_python] set_error_page and output buffering

Gregory (Grisha) Trubetskoy grisha at modpython.org
Mon Aug 16 17:32:00 EDT 2004


Hmm... The buffer that buffers output is controlled by Apache, and AFAIK 
once something's been written to it, you cannot get it back.

Grisha

On Mon, 16 Aug 2004, Iker Arizmendi wrote:

> One problem I've encountered with using set_error_page()
> for error handling is that often the faulty page has already
> generated some output when the error is encountered. This
> results in garbled pages with bits from both the error-raising
> page and the error-catching page.
>
> Is there some way to get around this?
>
> Regards,
> Iker
>
>
> Iker Arizmendi wrote:
>> Thanks Greg. Is there a method that clears the
>> current output buffer as well?
>> 
>> Gregory (Grisha) Trubetskoy wrote:
>> 
>>> 
>>> Yes, by default PSP does not flush the output buffer until the very end 
>>> which looks like what PHP ob_start func enables. If you want to force a 
>>> flush from within PSP, you can always call req.flush().
>>> 
>>> Grisha
>>> 
>>> On Fri, 13 Aug 2004, Iker Arizmendi wrote:
>>> 
>>>> Does the PSP handler support output buffering?
>>>> Something along the lines of ob_start under PHP? If
>>>> explicit support is not there, is there some other
>>>> way to accomplish the same thing?
>>>> 
>>>> Thanks,
>>>> Iker
>>>> 
>> 
>
> -- 
> Iker Arizmendi
> AT&T Labs - Research
> Speech and Image Processing Lab
> e: iker at research.att.com
> w: http://research.att.com
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list