[Web-SIG] WSGI safe write callable using greenlet

Manlio Perillo manlio_perillo at libero.it
Thu Apr 1 00:36:41 CEST 2010


Manlio Perillo ha scritto:
> Hi.
> 
> In this period I'm upgrading my WSGI implementation for Nginx:
> http://hg.mperillo.ath.cx/nginx/ngx_http_wsgi_module/
> [...]
> So, I was thinking: what about a WSGI middleware that, using greenlets,
> expose to the application a write callable with the correct code flow?
> 
> 
> Here is a very first draft:
> http://pastebin.com/4k1Ep4dH
> 
> It should work with every standard WSGI implementation.
> 

Here is a more generic middleware and example application:
http://pastebin.com/S8c1gRfY

and here is the output:
http://pastebin.com/zzkRiRuA


The example also contains hints about features I plan to implement,
like the wsgiorg.suspend extension, and subrequests.



Regards  Manlio


More information about the Web-SIG mailing list