[Zope] Re: how to set request http status.

Tres Seaver tseaver at zope.com
Fri Mar 11 12:24:21 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bahriesz at yahoo.com wrote:
| How do we set the http status of the Request reply
| back to browser?. This is needed in situation where we
| defined our own http status. Those you are familiar
| with snakelets framework, there is
| request.send_error(code, message).

You need to set the value on the *response*, not the request.

~  context.REQUEST['RESPONSE'].setStatus(666, 'Diabolical cleverness')

Tres.
- --
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCMdREGqWXf00rNCgRAoWrAJ9cEln8Z48j87JQxfNIVyLDvpYYXwCcCN/V
R1RahwABvHe+Ohitpw8zBqk=
=Ky9a
-----END PGP SIGNATURE-----



More information about the Zope mailing list