Commit f16e93af authored by Evan Simpson's avatar Evan Simpson

Turn off HTTP Request's URL cache until traversal is done. Incorrect values...

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.
parent ea6082c6
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.87 $'[11:-2]
__version__='$Revision: 1.88 $'[11:-2]
import re, sys, os, urllib, time, random, cgi, codecs
from types import StringType, UnicodeType
......@@ -1107,8 +1107,10 @@ class HTTPRequest(BaseRequest):
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 @@ class HTTPRequest(BaseRequest):
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment