This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stachjankowski
Recipients stachjankowski
Date 2011-11-18.11:03:49
SpamBayes Score 5.99696e-06
Marked as misclassified No
Message-id <1321614230.59.0.764469605478.issue13425@psf.upfronthosting.co.za>
In-reply-to
Content
http.client.HTTPMessage.getallmatchingheaders() always returns []

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

sjankowski@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@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']
History
Date User Action Args
2011-11-18 11:03:50stachjankowskisetrecipients: + stachjankowski
2011-11-18 11:03:50stachjankowskisetmessageid: <1321614230.59.0.764469605478.issue13425@psf.upfronthosting.co.za>
2011-11-18 11:03:49stachjankowskilinkissue13425 messages
2011-11-18 11:03:49stachjankowskicreate