[New-bugs-announce] [issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

Stanisław Jankowski report at bugs.python.org
Fri Nov 18 12:03:50 CET 2011


New submission from Stanisław Jankowski <stach.jankowski at gmail.com>:

http.client.HTTPMessage.getallmatchingheaders() always returns []

Python 3.2.2:
Calling the code below does not give the expected result.

sjankowski at sjankowski:~$ python3
Python 3.2.2rc1 (default, Aug 14 2011, 18:43:44) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.request import urlopen
>>> fp = urlopen('http://www.python.org/')
>>> fp.headers.getallmatchingheaders('Content-Type')
[]

At Python 2.7.2 returns the result.

sjankowski at sjankowski:~$ python
Python 2.7.2+ (default, Aug 16 2011, 09:23:59) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib import urlopen
>>> fp = urlopen('http://www.python.org/')
>>> fp.headers.getallmatchingheaders('Content-Type')
['Content-Type: text/html\r\n']

----------
components: Library (Lib)
messages: 147849
nosy: stachjankowski
priority: normal
severity: normal
status: open
title: http.client.HTTPMessage.getallmatchingheaders() always returns []
type: behavior
versions: Python 3.2

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


More information about the New-bugs-announce mailing list