Ok, I think I found a fix for it, but it's not a change in VHM.
As I mentioned in a follow-up to Zope bug 235, there is an inconsistency
in lib/python/ZPublisher/HTTPRequest.py in HTTPRequest.setVirtualRoot()
The attached patch (also in the bug report) explains what this
inconsistency is and seems to fix the VHM problem, but I don't know what
other side-effects it has. The 'utilities/testrunner.py -a' seems to run
ok.
On Wed, 2002-02-20 at 16:29, Leonardo Rochael Almeida wrote:
> Hi guys,
>
> I bring to your attention the bug
> "235":http://collector.zope.org/Zope/235 in the Zope collector, which I
> just posted.
>
> Apparently VHM is inserting exactly one spurious '/' in urls when the
> _vh_folder syntax is used. The problem seems to be in the
> VirtualHostMonster.__call__ method at
> lib/python/Products/SiteAccess/VirtualHostMonster.py, which has changed
> a lot relative to the 2.4.x version, however I couldn't make head or
> tails of that algorithm, so I wouldn't know how to fix it.
>
> This problem is seriously hampering our deployment of Zope 2.5.0 on
> clients, since most of the time we publish the root of the site from a
> Zope Folder and need the _vh_folder syntax to access the real Zope root
> for manteinance.
>
> Cheers, Leo
>
> PS: since we're talking about the collector, I'll also plug the other
> but I posted there "http://collector.zope.org/Zope/167", which talks
> about a problem with SuperFind() and includes a simple fix. It's still
> pending...
--
Ideas don't stay in some minds very long because they don't like
solitary confinement.
--- HTTPRequest.py.orig Wed Feb 20 19:14:20 2002
+++ HTTPRequest.py Wed Feb 20 19:16:00 2002
@@ -158,7 +158,8 @@
""" Treat the current publishing object as a VirtualRoot """
other = self.other
if type(path) is type(''):
- path = filter(None, path.split( '/'))
+ path = path.split('/')
+ path = filter(None, path)
self._script[:] = map(quote, path)
del self._steps[:]
parents = other['PARENTS']