[Zope-Checkins] CVS: Zope/lib/python/ZPublisher -
BaseRequest.py:1.51.16.1
Yvo Schubbe
schubbe at web.de
Fri Oct 10 09:28:18 EDT 2003
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv29338/lib/python/ZPublisher
Modified Files:
Tag: yuppie-collector1079-branch
BaseRequest.py
Log Message:
fixed infinite loops in traverse:
- reset default method after usage (Collector #1079-1)
- don't loop if entry_name is '' or None (Collector #1079-2)
- added some basic tests
=== Zope/lib/python/ZPublisher/BaseRequest.py 1.51 => 1.51.16.1 ===
--- Zope/lib/python/ZPublisher/BaseRequest.py:1.51 Fri May 30 11:21:15 2003
+++ Zope/lib/python/ZPublisher/BaseRequest.py Fri Oct 10 09:27:46 2003
@@ -10,7 +10,10 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
-__version__='$Revision$'[11:-2]
+""" Basic ZPublisher request management.
+
+$Id$
+"""
from urllib import quote
import xmlrpc
@@ -241,7 +244,6 @@
request['TraversalRequestNameStack'] = request.path = path
- entry_name = ''
try:
# We build parents in the wrong order, so we
# need to make sure we reverse it when we're doe.
@@ -269,13 +271,13 @@
request['TraversalRequestNameStack'] = path
continue
else:
- method = default_path[0]
- entry_name = method
+ entry_name = default_path[0]
elif (method and hasattr(object,method)
and entry_name != method
and getattr(object, method) is not None):
request._hacked_path=1
entry_name = method
+ method = 'index_html'
else:
if (hasattr(object, '__call__') and
hasattr(object.__call__,'__roles__')):
@@ -284,7 +286,6 @@
i=URL.rfind('/')
if i > 0: response.setBase(URL[:i])
break
- if not entry_name: continue
step = quote(entry_name)
_steps.append(step)
request['URL'] = URL = '%s/%s' % (request['URL'], step)
More information about the Zope-Checkins
mailing list