Message147849
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'] |
|
Date |
User |
Action |
Args |
2011-11-18 11:03:50 | stachjankowski | set | recipients:
+ stachjankowski |
2011-11-18 11:03:50 | stachjankowski | set | messageid: <1321614230.59.0.764469605478.issue13425@psf.upfronthosting.co.za> |
2011-11-18 11:03:49 | stachjankowski | link | issue13425 messages |
2011-11-18 11:03:49 | stachjankowski | create | |
|