[Zope] VHM / traverse subpath interaction bug?

Chris Withers chris at simplistix.co.uk
Fri Oct 10 10:56:40 EDT 2008


Tres Seaver wrote:
>>>   steps.
>> I bet repoze's VHM replacement doesn't need this ;-)
>> I wonder how they do it?
> 
> Two parts:
> 
>   - The first (WSGI middleware) uses either extra headers or the
>     Zope2-style URL tokens to adjust the CGI environment variables
>     (SERVER_NAME, HTTP_HOST, SCRIPT_NAME, and PATH_INFO), plus a
>     stock WSGI environment variable ('wsgi.url_scheme'). See
>     http://svn.repoze.org/repoze.vhm/trunk/repoze/vhm/middleware.py
> 
>   - The second part (in the application) just uses those values
>     according to their "stock" CGI meanings, and sets the 'SERVER_URL'
>     key in the request.  Once that is set, the stock ZPublisher
>     virtual hosting machinery is neutered. ;)  See
>     http://svn.repoze.org/repoze.zope2/trunk/repoze/zope2/z2bob.py

Well okay, but can Zope 2's VHM be re-implemented in such a way as to 
not need the silly hidden traversal step?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list