[Web-SIG] Draft PEP: WSGI 1.1
manlio_perillo at libero.it
Thu Apr 15 18:30:40 CEST 2010
And Clover ha scritto:
>> 8. The value passed to the 'write()' callback returned by
>> 'start_response()' should be a byte string. Where native strings
>> are unicode strings, a native string type can also be supplied, in
>> which case it would be encoded as ISO-8859-1.
> Weren't we going to only allow US-ASCII for the output? (These threads
> are always so far apart I can never remember what conclusion we
> reached... if any.)
By the way, yesterday I wrote some tests for Python 3.x and I found a
possible problem (only indirectly related to WSGI, however).
The example consists in a simple client -> proxy -> server, where the
client and server are in Python 2.5 and the proxy in Python 3.2
(compiled from tip, some time ago).
Here is the proxy:
The application fails, if cookie contains non ascii character.
The reason is that, for reasons I do not understand, http.client encode
request headers using us-ascii, instead of iso-8859-1.
The offending code is:
More information about the Web-SIG