Phillip J. Eby ha scritto: > At 06:21 PM 10/15/2007 +0200, Manlio Perillo wrote: >> Phillip J. Eby ha scritto: >> > At 05:52 PM 10/15/2007 +0200, Manlio Perillo wrote: >> >> Hi. >> >> >> >> I'm implementing the start_response callable for Nginx mod_wsgi and I >> >> have a few questions. >> >> >> >> 1) From the WSGI PEP it seems that an implementation is allowed to >> >> *always* raise an exception when start_response is called with >> a not >> >> null exc_info. >> >> >> >> Is this true? >> > >> > Yes - as long as it's the exc_info passed in, i.e.: >> >> It seems that WSGI *does not* requires the application to raise the >> exc_info passed. > > We're talking about the *server*, not the application: >
Sorry, I have written application, but I meant server :-). > "if exc_info is provided, and the HTTP headers have already been sent, > start_response MUST raise an error, and SHOULD raise the exc_info tuple." > > So, it's a "should" for the server, with the intent being that you > should have some special reason for not doing so. This is later > clarified in the PEP as meaning that exception-handling middleware may > have reasons to raise an alternative error or not raise an error. > However, there aren't any anticipated use cases for server gateways to > do anything but raise the passed-in errors. > Ok, thanks for the clarification. > [...] 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