[Zope-Checkins] CVS: Packages/ZPublisher - HTTPRequest.py:1.88
Evan Simpson
evan@zope.com
Fri, 14 Feb 2003 17:52:36 -0500
Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv27355
Modified Files:
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.
=== Packages/ZPublisher/HTTPRequest.py 1.87 => 1.88 ===
--- Packages/ZPublisher/HTTPRequest.py:1.87 Thu Jan 2 15:29:59 2003
+++ Packages/ZPublisher/HTTPRequest.py Fri Feb 14 17:52:36 2003
@@ -1107,8 +1107,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_':
@@ -1137,8 +1139,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: