[Zope3-checkins] CVS: Zope3/src/zope/publisher - browser.py:1.16

Marius Gedminas mgedmin@codeworks.lt
Wed, 16 Apr 2003 02:57:50 -0400


Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv8458/src/zope/publisher

Modified Files:
	browser.py 
Log Message:
Added an XXX comment about redirects to relative URIs.


=== Zope3/src/zope/publisher/browser.py 1.15 => 1.16 ===
--- Zope3/src/zope/publisher/browser.py:1.15	Fri Apr 11 08:55:41 2003
+++ Zope3/src/zope/publisher/browser.py	Wed Apr 16 02:57:49 2003
@@ -812,6 +812,14 @@
                 base += '/'
             location = base + location
 
+        # XXX: HTTP redirects must provide an absolute location, see
+        #      http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
+        #      So, what if location is relative and base is unknown?  Uncomment
+        #      the following and you'll see that it actually happens.
+        #
+        # if isRelative(str(location)):
+        #     raise AssertionError('Cannot determine absolute location')
+
         super(BrowserResponse, self).redirect(location, status)