[Zope-PAS] challenge branch ready for review

Chris Withers chris at simplistix.co.uk
Tue Nov 23 10:03:19 EST 2004


Lennart Regebro wrote:
> response._unauthorized does not set the header status, exception() does, 
> it does not set the body, exception does, and so on.
> 
> We can prevent exception from setting the status by setting 
> response._locked_status = 1 in the plugins. Not exactly obvious, but it 
> can be documented. But we can't prevent it from setting the body. 

Actually, in Zope 2.8, you can with response._locked_body.
Also, response.setBody(...yada...,lock=True), which has the same effect.

I added this ages ago so I could write a standard_error_message that 
went to look on another server (in a proxy-ish sort of way) when a 404 
occurred.

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-PAS mailing list