At 12:54 PM 9/25/2007 +0200, Manlio Perillo wrote: >The WSGI spec says that start_response callable *must not* actually >transmit the response headers. Instead, it must store them. > >The problem is that it says nothing about errors checking. >As an example the Apache mod_wsgi implementation only checks that the >objects is a Python List Object. > >This means that I can do: > >start_response('200 OK', [1, 2, 3]) > >with no exception being raised (the exception will only be raise when I >attempt to write some data). > >Is this the intentend behaviour?
No. start_response() *should* raise an error when given the bad data. This should probably be fixed in the PEP. >P.S.: >I'm not sure, but it seems that Apache mod_wsgi allows status code with >more then 3 digits, without reporting an error. >Again, is this the intented, conforming, behaviour? No. It should be rejected. In general, a WSGI server *should* reject bad input as soon as it receives it. All that being said, these points are "shoulds" rather than "musts". A good implementation should implement them. _______________________________________________ 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