Created on 2014-03-13 15:27 by r.david.murray, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (5) |
|
|
msg213406 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2014-03-13 15:27 |
Some places in the code it is an email.message.Message object. Some places it is a simple dictionary. In one place (FTP), it is a string with embedded newlines. I'm not sure what should be done about this situation, but it looks like a bug magnet, and it makes it pretty much impossible to document the data type. |
|
|
msg237381 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2015-03-06 21:05 |
@Demian I believe this maybe of interest to you. |
|
|
msg334246 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2019-01-23 03:50 |
@R. David Murray Is this issue still valid? Running 3.6 it seems that http and ftp are consistent at any rate (http returns http.client.HTTPMessage and ftp returns email.message.Message). If it's still an issue, could you please elaborate? |
|
|
msg334270 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2019-01-23 20:18 |
There has been considerable rewriting of the header handling code since I filed this. I would not be surprised if the issue is no longer valid. If you want to double check, look for the places that the headers attribute is created in the various handlers. Otherwise you can just close this as out of date. |
|
|
msg334327 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2019-01-24 23:51 |
>>> 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. |
|
|
History |
|
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:59 |
admin |
set |
github: 65110 |
2019-01-24 23:51:33 |
demian.brecht |
set |
status: open -> closedresolution: out of datemessages: + stage: resolved |
2019-01-23 20🔞43 |
r.david.murray |
set |
messages: + |
2019-01-23 11:48:52 |
BreamoreBoy |
set |
nosy: - BreamoreBoy |
2019-01-23 03:50:39 |
demian.brecht |
set |
messages: + |
2015-03-06 21:05:14 |
BreamoreBoy |
set |
nosy: + demian.brecht, BreamoreBoymessages: + |
2014-03-13 15:27:34 |
r.david.murray |
create |
|