[issue20911] urllib 'headers' is not a well defined data type

Demian Brecht report at bugs.python.org
Thu Jan 24 18:51:33 EST 2019


Demian Brecht <demianbrecht at gmail.com> added the comment:

>>> urlopen('https://example.com').info()
<http.client.HTTPMessage object at 0x111528da0>
>>> urlopen('http://example.com').info()
<http.client.HTTPMessage object at 0x111528be0>
>>> urlopen('ftp://speedtest.tele2.net').info()
<email.message.Message object at 0x111531080>
>>> urlopen('file:///path/to/setup.py').info()
<email.message.Message object at 0x111528f60>

I've taken a look at the rest of the handlers in urllib.request and they all build headers consistently with email.message_from_string().

Closing as out of date.

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20911>
_______________________________________


More information about the Python-bugs-list mailing list