Graham Dumpleton wrote: > The problem then as above is what does one do at > the boundary between a WSGI application and the > web server hosting it? Do you just always assume > a WSGI application provides an error page, or allow > some way that a WSGI application can defer to the > web server the task of generating an error page > instead?
The web server should not be trying to correct what the application gives it, except as absolutely necessary to get the response on the wire, or obey the HTTP spec (and even that's questionable). If you want consistent error pages across an entire application or site, write a piece of WSGI middleware which does that and explicitly include it in your middleware graph. To quote the PEP: In general, servers and gateways should "play dumb" and allow the application complete control over its output. They should only make changes that do not alter the effective semantics of the application's response. It is always possible for the application developer to add middleware components to supply additional features, so server/gateway developers should be conservative in their implementation. In a sense, a server should consider itself to be like an HTTP "gateway server", with the application being an HTTP "origin server". (See RFC 2616, section 1.3, for the definition of these terms.) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED]
_______________________________________________ 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