On 3 January 2012 08:34, Sylvain Viollon <sylvain@infrae.com> wrote:
Op 1 jan 2012, om 20:39 heeft Martin Aspeli het volgende geschreven:
Hi,
Hello,
There are three known WSGI implementations of the Zope 2 publisher. I've had a look at them and made some notes about what I think provides the best story:
## Zope 2.13 WSGIPublisher
[...]
## infrae.wsgi
Pros:
* Clean and well documented * Properly emits publication events * Supports streaming
Those two points are features I use actively in Silva, and where motivation for me to work on my implementation. (I had a look before to repoze.zope2 and the default Zope 2 support, back in 2.12).
* Supports simplified virtual hosting with X-VHM-Host
That is not completely true. I support setting the hostname, however to set a virtual path, you need to do this during traversing, which is done in BaseRequest, that I don't change (because it is a big large blob of code where you cannot really plug anything in it, or change only a few line in it without changing everything).
In production we use mod_rewrite to rewrite the URL with an old VirtualHostMonster url and pass it to mod_wsgi with the help of the flags PT.
What advantage is there to setting the X-VHM-Host header over just setting the Host header? Laurence