[Zope-dev] Zope Tests: 34 OK, 7 Failed
Summary of messages to the zope-tests list. Period Thu Oct 7 12:00:00 2010 UTC to Fri Oct 8 12:00:00 2010 UTC. There were 41 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 20 from buildbot at winbot.zope.org, 11 from ccomb at free.fr. Test failures - Subject: FAILED : winbot / ztk_dev py_254_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 16:18:57 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021215.html Subject: FAILED : winbot / ztk_dev py_265_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 16:19:54 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021216.html Subject: FAILED : winbot / ztk_dev py_265_win64 From: buildbot at winbot.zope.org Date: Thu Oct 7 16:28:59 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021217.html Subject: FAILED : winbot / ztk_dev py_270_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 16:37:33 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021218.html Subject: FAILED : winbot / ztk_dev py_270_win64 From: buildbot at winbot.zope.org Date: Thu Oct 7 16:46:21 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021219.html Subject: FAILED : winbot / ztk_10 py_244_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 16:56:18 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021220.html Subject: FAILED : winbot / zc_buildout_dev py_244_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 17:34:51 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021224.html Tests passed OK --- Subject: OK : winbot / ztk_10 py_254_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 17:04:57 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021221.html Subject: OK : winbot / ztk_10 py_265_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 17:13:08 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021222.html Subject: OK : winbot / ztk_10 py_265_win64 From: buildbot at winbot.zope.org Date: Thu Oct 7 17:21:39 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021223.html Subject: OK : winbot / zc_buildout_dev py_254_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 17:47:24 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021225.html Subject: OK : winbot / zc_buildout_dev py_265_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 18:01:10 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021226.html Subject: OK : winbot / zc_buildout_dev py_265_win64 From: buildbot at winbot.zope.org Date: Thu Oct 7 18:11:50 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021227.html Subject: OK : winbot / zc_buildout_dev py_270_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 18:23:02 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021228.html Subject: OK : winbot / zc_buildout_dev py_270_win64 From: buildbot at winbot.zope.org Date: Thu Oct 7 18:34:13 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021229.html Subject: OK : winbot / ZODB_dev py_254_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 19:30:43 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021230.html Subject: OK : ZTK 1.0 / Python2.4.6 Linux 64bit From: ccomb at free.fr Date: Thu Oct 7 19:41:46 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021231.html Subject: OK : ZTK 1.0 / Python2.6.5 Linux 64bit From: ccomb at free.fr Date: Thu Oct 7 19:42:13 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021232.html Subject: OK : ZTK 1.0 / Python2.5.5 Linux 64bit From: ccomb at free.fr Date: Thu Oct 7 19:42:23 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021233.html Subject: OK : winbot / ZODB_dev py_265_win32 From: buildbot at winbot.zope.org Date: Thu Oct 7 20:27:25 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021234.html Subject: OK : Zope 3.4 Known Good Set / py2.4-64bit-linux From: buildbot at pov.lt Date: Thu Oct 7 21:11:30 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021235.html Subject: OK : winbot / ZODB_dev py_265_win64 From: buildbot at winbot.zope.org Date: Thu Oct 7 21:24:11 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021236.html Subject: OK : Zope-2.10 Python-2.4.6 : Linux From: Zope Tests Date: Thu Oct 7 21:31:01 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021237.html Subject: OK : Zope-2.11 Python-2.4.6 : Linux From: Zope Tests Date: Thu Oct 7 21:33:01 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021238.html Subject: OK : Zope-2.12 Python-2.6.5 : Linux From: Zope Tests Date: Thu Oct 7 21:35:01 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021239.html Subject: OK :
[Zope] How to setStatus(301) for zException Redirect
Using Zope 2.10.8 I'd like to let an access rule trigger a 301 'moved permanently' redirect. I created an external method to raise the exception, which almost does the trick except for the fact that it generates a 302 Moved Temporarily status code. from zExceptions import Redirect def myDispatcher(self, url): raise Redirect(url) Tried request.setStatus(301) both in my access rule and the external method, but this effectively disables the redirect. Also tried modifying my external method similar to request.response.redirect() as follows. Still no luck. from zExceptions import Redirect def myDispatcher(self, url, status, lock): raise Redirect(url, status, lock) I finally traced it to HTTPResponse.py starting around line 763-790 the 302 status seems to be hardcoded. How would I go about changing this? I'd rather not hack directly in the Zope code... self.setStatus(t) if self.status = 300 and self.status 400: if isinstance(v, str) and absuri_match(v) is not None: if self.status == 300: self.setStatus(302) self.setHeader('location', v) tb = None # just one path covered return self elif isinstance(v, Redirect): # death to string exceptions! if self.status == 300: self.setStatus(302) self.setHeader('location', v.args[0]) self.setBody('') tb = None return self else: try: l, b = v if (isinstance(l, str) and absuri_match(l) is not None): if self.status == 300: self.setStatus(302) self.setHeader('location', l) self.setBody(b) tb = None # one more patch covered return self except: pass # tb is not cleared in this case Norbert ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )