[Zope-dev] Raising HTTP response codes from PythonMethods

Itamar Shtull-Trauring itamars@ibm.net
Mon, 03 Apr 2000 15:53:46 +0200


Oleg Broytmann wrote:

> raise "Redirect", REQUEST["BASE0"]
> 
>    is a point where you may start experimenting...

Thanks, that helped:

I do
	raise "NotModified", ''

and I do get a 304 Not modified response, but I *also* get a Zope error. 
The correct code is apparently:

        RESPONSE.setStatus(304)
        RESPONSE.write('')
        raise "NotModified", ''
 
-- 
Itamar S.T.  itamars@ibm.net