nginx git repository
adrianperez at udc.es
Sun Oct 14 15:52:54 MSD 2007
First of all, sorry for the late reply, I have been quite busy lately.
On Fri, 05 Oct 2007 19:43:40 +0200
Manlio Perillo <manlio_perillo at libero.it> wrote:
> Adrian Perez de Castro ha scritto:
> > [...]
> >> Thanks a lot, will look into these. Did you try running bigger
> >> things a'la Django under mod_wsgi?
> > I tried to run Trac 0.10.4, MoinMoin 1.5.8 and the Bazaar 0.90 smart
> > server, without luck. As both are WSGI 1.0 applications, I did the
> > quick-and-dirt trick of wrapping them so they are exposed to Nginx
> > as WSGI 2.0 ones. I need to further investigate, but I suppose they
> > yielding more than a single result (which currently mod_wsgi does
> > not support, AFAIK).
> The current revision now fully supports WSGI 2.0, but does not yet
> support asynchronous writes (I'm adding support right now).
> Can you send me the logs?
> The log level should be "info";
I will re-run the tests with log level set to "info", but I will first
update to the latest revision of the mod_wsgi module. I am using the
following Python snippet to adapt WSGI 1.0 apps to 2.0, they are a set
of decorators for WSGI applications, I hope they are ok although I have
not read the WSGI standard in depth:
---- <snip> ----
__slots__ = ("response", "headers")
self.response = None
self.headers = ()
def __call__(self, response, headers):
self.response = response
self.headers = headers
"""Converts a 1.0 app into a 2.0 app"""
context = Context()
results = application(environ, context)
return context.response, context.headers, results
"""Makes a 2.0 app return only one element as result"""
response, headers, results = application(environ)
return response, headers, "".join(results)
"""Applies the two above decorators, which is needed for
a 1.0 application to work inside Nginx.
---- </snip> ----
Los eclecticistas son los que hacen el gotelé.
More information about the nginx