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 martin.panter
Recipients EvensF, docs@python, martin.panter, orsenthil, r.david.murray
Date 2014-04-22.03:31:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398137514.95.0.700980870513.issue21228@psf.upfronthosting.co.za>
In-reply-to
Content
I interpreted it more along the lines of “. . . returns a http.client.HTTPResponse object [with] the following [additional] methods.” Indeed, a HTTP urlopen() response I just tried does have info(), geturl() and getcode() methods, and I know the info() method is used in the real world.

Also, it would be good to document that the HTTP response’s “msg” attribute does not actually hold the header, despite the HTTPResponse documentation. Further, the return value of BaseHandler.default_open() is defined to be the same as urlopen(), but when a HTTP error occurs I have found the “msg” attribute is meant to be the HTTP status text phrase (e.g. “Not Found”).

Perhaps it would be good to add something like these two points wherever they belong:

* The “msg” attribute returned by urlopen() does not hold the HTTP header, despite the “HTTPResponse” documentation
* The “msg” attribute should be set to the HTTP status text phrase (HTTPResponse.reason)
History
Date User Action Args
2014-04-22 03:31:54martin.pantersetrecipients: + martin.panter, orsenthil, r.david.murray, docs@python, EvensF
2014-04-22 03:31:54martin.pantersetmessageid: <1398137514.95.0.700980870513.issue21228@psf.upfronthosting.co.za>
2014-04-22 03:31:54martin.panterlinkissue21228 messages
2014-04-22 03:31:54martin.pantercreate