[Zope-Checkins] CVS: Releases/Zope/lib/python/ZPublisher - HTTPRequest.py:1.81.2.5
Evan Simpson
evan@zope.com
Fri, 14 Feb 2003 17:56:31 -0500
Update of /cvs-repository/Releases/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv28525
Modified Files:
Tag: Zope-2_6-branch
HTTPRequest.py
Log Message:
Turn off HTTP Request's URL cache until traversal is done. Incorrect values were being cached in the presence of a DTML
Method Access Rule.
=== Releases/Zope/lib/python/ZPublisher/HTTPRequest.py 1.81.2.4 => 1.81.2.5 ===
--- Releases/Zope/lib/python/ZPublisher/HTTPRequest.py:1.81.2.4 Fri Dec 20 10:32:57 2002
+++ Releases/Zope/lib/python/ZPublisher/HTTPRequest.py Fri Feb 14 17:56:30 2003
@@ -1096,8 +1096,10 @@
path = [''] + path[:n]
else:
path = [other['SERVER_URL']] + path[:n]
- other[key] = URL = '/'.join(path)
- self._urls = self._urls + (key,)
+ if other.has_key('PUBLISHED'):
+ # Don't cache URLs until publishing traversal is done.
+ other[key] = URL = '/'.join(path)
+ self._urls = self._urls + (key,)
return URL
if isCGI_NAME(key) or key[:5] == 'HTTP_':
@@ -1126,8 +1128,10 @@
v.insert(0, '')
else:
v.insert(0, other['SERVER_URL'])
- other[key] = URL = '/'.join(v)
- self._urls = self._urls + (key,)
+ if other.has_key('PUBLISHED'):
+ # Don't cache URLs until publishing traversal is done.
+ other[key] = URL = '/'.join(v)
+ self._urls = self._urls + (key,)
return URL
if key=='BODY' and self._file is not None: