[mod_python] set_error_page and output buffering

Iker Arizmendi iker at research.att.com
Mon Aug 16 14:08:40 EDT 2004


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




More information about the Mod_python mailing list