Hi. Nginx, in one of the headers filters, can do ETag and Last-Modified validation.
I want to be able to use this feature, so I don't have to use thirdy party solutions. However with the current WSGI implementation this is not possible. A possibile solution can be to add an extension `x-wsgiorg.flush`, a callable object that notify the WSGI gateway that it can flush the headers (if they are not yet be sent) or the output buffer (Nginx has this feature, however I have yet not understand how it works). start_response('200 Ok', [('Last-Modified', 'xxx')]) ... environ['x-wsgiorg.flush']() return a-generator The WSGI gateway can now send the headers before iterating over the generator, and if the client content is up-to-date, the new content is never generated. The intent of this extension is to be transparent to the WSGI application. In case of nginx mod_wsgi, the validation can be done by Nginx, but for generic WSGI applications this can be done by a middleware. I don't know if this feature is feasible, since I have not yet implemented it, so I would like to receive some feedbacks. Thanks Manlio Perillo _______________________________________________ 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