Problem with wsgiref.headers.Headers
gagsl-py2 at yahoo.com.ar
Sun Jan 17 17:47:54 CET 2010
En Fri, 15 Jan 2010 18:41:29 -0300, Phil <phily05 at gmail.com> escribió:
> I am having an issue with wsgiref.headers.Headers.
> For example, if I do this...
> from wsgiref.headers import Headers
> list = 
> wrapper = Headers(list)
> wrapper['content-type'] = "text/html"
> I get an empty list printed, and then the correct result for wrapper
You forgot to mention the Python version; the code works fine with 2.x,
but fails in 3.1
r68205  is the culprit, in response to issue #4718 
The commit message says the changes were made to comply with
http://www.wsgi.org/wsgi/Amendments_1.0 (basically, clarify
str/unicode/bytes handling in Python 3.x). Either the documentation should
be updated or the original behavior be maintained (meaning the original
list contents could be altered); you probably should raise the question in
the Web-SIG .
More information about the Python-list