[Zope-Checkins] CVS: Products/SiteAccess - VirtualHostMonster.py:1.7
Evan Simpson
evan@zope.com
Mon, 25 Feb 2002 11:02:56 -0500
Update of /cvs-repository/Products/SiteAccess
In directory cvs.zope.org:/tmp/cvs-serv29352/Products/SiteAccess
Modified Files:
VirtualHostMonster.py
Log Message:
Merge vhm fix from Zope-2_5-branch
=== Products/SiteAccess/VirtualHostMonster.py 1.6 => 1.7 ===
def set_map(self, map_text, RESPONSE=None):
"Set domain to path mappings."
- lines = split(map_text, '\n')
+ lines = split(map_text, '\n')
self.fixed_map = fixed_map = {}
self.sub_map = sub_map = {}
new_lines = []
@@ -49,7 +49,7 @@
host, path = map(strip, split(line, '/', 1))
except:
raise 'LineError', 'Needs a slash between host and path'
- pp = filter(None, split(path, '/'))
+ pp = filter(None, split(path, '/'))
if pp:
obpath = pp[:]
if obpath[0] == 'VirtualHostBase':
@@ -158,7 +158,6 @@
# If the directive is on top of the stack, go ahead
# and process it right away.
if at_end:
- pp = filter(None, pp)
request.setVirtualRoot(pp)
del stack[-2:]
break
@@ -203,7 +202,7 @@
parents.pop() # I don't belong there
if len(name) > 1:
- request.setVirtualRoot(split(name[1:], '/'))
+ request.setVirtualRoot(name)
else:
request.setVirtualRoot([])
return parents.pop() # He'll get put back on