[Web-SIG] Move to bless Graham's WSGI 1.1 as official spec
manlio_perillo at libero.it
Fri Dec 4 19:40:55 CET 2009
Henry Precheur ha scritto:
> On Fri, Dec 04, 2009 at 10:17:09AM +0100, Manlio Perillo wrote:
>> It is just as simple as using byte strings, IMHO.
> No, it's not. There were lots of dicussions regarding this on the
> mailing list. One of the main issue is that the standard library
> supports bytes poorly. urllib for example expects strings not bytes.
I read last month discussions 3 day ago!
The quote function supports byte strings, as an example.
What are the functions that does not works with byte strings?
>>> * WSGI sticks to what RFC 2616 (Hypertext Transfer Protocol -- HTTP/1.1)
>>> says. WSGI is about HTTP, but that doesn't necessarily includes all
>>> other standards extending HTTP.
>> HTTP never says to consided whole headers as latin-1 text, IMHO.
> It does:
> When no explicit charset parameter is provided by the sender, media
> subtypes of the "text" type are defined to have a default charset value
> of "ISO-8859-1" when received via HTTP.
This is not correct.
First of all, HTTP never says that whole headers are of type TEXT.
Only specific components are of type TEXT.
Moreover, HTTPbis has finally clarified this; TEXT is no more used,
instead non ascii characters are to be considered opaque.
Do you really want to define the new WSGI specification to be "against"
the new (possible) HTTP spec?
Of course it will work; but since some code in the standard library
needs to be fixed (the wsgiref.util.application_uri, as an example),
maybe it is better to fix it to work with byte strings.
Just my two cents.
More information about the Web-SIG