Hello, Maybe I'm missing something obvious, but if the gateway doesn't support applications that return write() callables, then it's not WSGI.
A callable that raises an exception does not even count. It's obvious that they must not raise exceptions -- Then what's the point of providing the callable? That said, I *think* it might be OK to disable support for the write() callable *optionally* on a per application basis. For example, the gateway could look at the "requires_write" attribute of the application callable, if any: """ def wsgi_app(environ, start_response): # ... process the request and return a response.... wsgi_app.requires_write = False """ That way, applications which don't use the write() callable can let your gateway know and thus it won't pass one on. We could even standardize this (at wsgi.org) so that any WSGI middleware which wraps an application can expose the "requires_write" attribute of the wrapped application... As long as such a middleware doesn't use write() either. On the other hand, I would avoid using "middleware" in this context for something specific to your implementation as people will believe it's a proper WSGI middleware. It'd certainly be *middle*ware, but I'd use something that is not confusing/misleading, like "filter". This is just a suggestion. Cheers, -- Gustavo Narea <xri://=Gustavo>. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com