Commit 340d366e authored by Evan Simpson's avatar Evan Simpson

Merge vhm fix from Zope-2_5-branch

parent 44c4c51c
...@@ -158,7 +158,6 @@ class VirtualHostMonster(Persistent, Item, Implicit): ...@@ -158,7 +158,6 @@ class VirtualHostMonster(Persistent, Item, Implicit):
# If the directive is on top of the stack, go ahead # If the directive is on top of the stack, go ahead
# and process it right away. # and process it right away.
if at_end: if at_end:
pp = filter(None, pp)
request.setVirtualRoot(pp) request.setVirtualRoot(pp)
del stack[-2:] del stack[-2:]
break break
...@@ -203,7 +202,7 @@ class VirtualHostMonster(Persistent, Item, Implicit): ...@@ -203,7 +202,7 @@ class VirtualHostMonster(Persistent, Item, Implicit):
parents.pop() # I don't belong there parents.pop() # I don't belong there
if len(name) > 1: if len(name) > 1:
request.setVirtualRoot(split(name[1:], '/')) request.setVirtualRoot(name)
else: else:
request.setVirtualRoot([]) request.setVirtualRoot([])
return parents.pop() # He'll get put back on return parents.pop() # He'll get put back on
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.61 $'[11:-2] __version__='$Revision: 1.62 $'[11:-2]
import re, sys, os, urllib, time, whrandom, cgi import re, sys, os, urllib, time, whrandom, cgi
from BaseRequest import BaseRequest from BaseRequest import BaseRequest
...@@ -158,8 +158,8 @@ class HTTPRequest(BaseRequest): ...@@ -158,8 +158,8 @@ class HTTPRequest(BaseRequest):
""" Treat the current publishing object as a VirtualRoot """ """ Treat the current publishing object as a VirtualRoot """
other = self.other other = self.other
if type(path) is type(''): if type(path) is type(''):
path = filter(None, path.split( '/')) path = path.split( '/')
self._script[:] = map(quote, path) self._script[:] = map(quote, filter(None, path))
del self._steps[:] del self._steps[:]
parents = other['PARENTS'] parents = other['PARENTS']
if hard: if hard:
......
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