[New-bugs-announce] [issue9019] wsgiref.headers.Header() does not update headers list it was created with.

Marcel Hellkamp report at bugs.python.org
Thu Jun 17 20:34:17 CEST 2010


New submission from Marcel Hellkamp <defnull at gmail.com>:

The current (3.x) implementation of wsgiref.headers.Headers() does not match the documentation.

Documented behaviour:
"Any changes made to the new Headers object will directly update the headers list it was created with." (/Doc/library/wsgiref.rst)

Actual behaviour:
The initial headers list is not updated.

The error was introduced with revision 68205. See http://svn.python.org/view/python/branches/py3k/Lib/wsgiref/headers.py?view=diff&r1=68204&r2=68205

Revision 68204::
    >>> from wsgiref.headers import Headers
    >>> l = []
    >>> h = Headers(l)
    >>> h.add_header('Test','Test')
    >>> l
    [('Test', 'Test')]

Revision 68205::
    >>> from wsgiref.headers import Headers
    >>> l = []
    >>> h = Headers(l)
    >>> h.add_header('Test','Test')
    >>> l
    []

----------
components: Library (Lib)
messages: 108042
nosy: Marcel.Hellkamp
priority: normal
severity: normal
status: open
title: wsgiref.headers.Header() does not update headers list it was created with.
type: behavior
versions: Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9019>
_______________________________________


More information about the New-bugs-announce mailing list