[Twisted-web] making streams optional in web2

James Y Knight foom at fuhm.net
Thu Feb 9 13:24:37 MST 2006


On Feb 9, 2006, at 3:08 PM, Jean-Paul Calderone wrote:

>    def app(environ, start_response):
>        start_response('200 Ok', [('Content-Type', 'text/plain')])
>        return 'WSGI is a wonderful thing.'

There's a problem there: the return value of a wsgi resource is a  
sequence, so you're returning a sequence of single character strings,  
thus causing excessively high overhead. Perhaps that ought to be  
special cased, cause I'm sure more people than you will make that  
mistake.

James



More information about the Twisted-web mailing list