Phillip J. Eby ha scritto: > Thinking about this made me realize that WSGI 2.0 isn't going to be able > to validate *anything* about a response by raising an error in the > application, because everything is done after the code returns. >
In this case, if the cache validation fails, we just have to generate the body content. For which cases do you want to raise an exception? > That suggests to me that these sorts of errors should be handled by > changing the response sent to the browser, instead. Right. In this case Nginx, when the cache is fresh, should change the response code from 200 (OK) to 304 (Not Modified). If I'm right, the current WSGI spec does not forbids or allows this. > That is, sending an > internal error message to the browser and logging details of the problem. > Regards 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