[Zope3-checkins] CVS: Zope3/lib/python/Zope/Publisher/Browser - BrowserResponse.py:1.7
Steve Alexander
steve@cat-box.net
Fri, 8 Nov 2002 08:23:26 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/Browser
In directory cvs.zope.org:/tmp/cvs-serv18783/lib/python/Zope/Publisher/Browser
Modified Files:
BrowserResponse.py
Log Message:
changed redirect method to be in line with its interface.
=== Zope3/lib/python/Zope/Publisher/Browser/BrowserResponse.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/Publisher/Browser/BrowserResponse.py:1.6 Thu Oct 3 09:08:59 2002
+++ Zope3/lib/python/Zope/Publisher/Browser/BrowserResponse.py Fri Nov 8 08:23:25 2002
@@ -98,17 +98,17 @@
def setBase(self, base):
self._base = base
- def redirect(self, uri):
+ def redirect(self, location, status=302):
base = getattr(self, '_base', '')
- if base and isRelative(str(uri)):
+ if base and isRelative(str(location)):
l = base.rfind('/')
if l >= 0:
base = base[:l+1]
else:
base += '/'
- uri = base + uri
+ location = base + location
- super(BrowserResponse, self).redirect(uri)
+ super(BrowserResponse, self).redirect(location, status)