[Web-SIG] Move to bless Graham's WSGI 1.1 as official spec
and-py at doxdesk.com
Tue Dec 1 01:44:48 CET 2009
Graham Dumpleton wrote:
> Answering my own question, it is actually obvious that it has to be
> called (1, 0). This is because wsgiref in Python 3.X already calls it
> (1, 0) and don't have much choice to be in agreement with that.
wsgiref.simple_server in Python 3 to date is not something that anyone
should worry about being compatible with. It is a 2to3 hack that cannot
meaningfully claim to represent wsgi version anything.
Careless use of urllib.parse.unquote causes 3.0's simple_server not to
work at all, and 3.1's to mangle the path by treating it as UTF-8
instead of ISO-8859-1, as 'WSGI 1.1' proposed and mod_wsgi (and even
mod_cgi via wsgiref.CGIHandler) delivered.
Yes, I'm always going on about Unicode paths. I'm fed up of shipping
apps with a page-long deployment note about fixing them. It pains me
that in so many years both this and "What do we do about Python 3?"
still haven't been addressed.
mod_wsgi 3.0 already has more traction than wsgiref 3.1 and I would
prefer not to see more farcical reverse-progress at this point.
For what it's worth my responses on the issues of this thread. But at
this point I really just want a BDFL to just come and do it, whatever it
is. A new WSGI, whatever the version number, is massively overdue.
>> 1. The 'readline()' function of 'wsgi.input' may optionally take a
Yes. Obviously. Bad practice but unavoidable now. Should have been a 1.0
amendment a long time ago.
>> 2. The 'wsgi.input' must provide an empty string as end of input
>> 3. The size argument to 'read()' function of 'wsgi.input' would be
optional and if not supplied the function would return all available
>> 4. The 'wsgi.file_wrapper' supplied by the WSGI adapter must honour
the Content-Length response header and must only return from the file
that amount of content.
+0. Seems reasonable but don't massively care. Presumably an application
must refuse to run on 1.0 if it requires these behaviours?
>> 5. Any WSGI application or middleware should not return more data
than specified by the Content-Length response header if defined.
>> 6. The WSGI adapter must not pass on to the server any data above
what the Content-Length response header defines if supplied.
mailto:and at doxdesk.com
More information about the Web-SIG