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 deokhwan.kim
Recipients deokhwan.kim
Date 2011-10-04.23:02:50
SpamBayes Score 6.685827e-05
Marked as misclassified No
Message-id <1317769371.74.0.590194297783.issue13104@psf.upfronthosting.co.za>
In-reply-to
Content
There is a minor typo in Lib/urllib/request.py:thishost(). Because of it, the thishost() function is returning a garbage value:

  >>> import urllib.request
  >>> urllib.request.thishost()
  ('XXXXXXX.XXXXX.XXX.com', ['X.XXXXX.XXX.com'], ['123.45.67.89'])

It is expected to return the IP addresses of the current host, so the correct return value would be like:

  >>> urllib.request.thishost.__doc__
  'Return the IP addresses of the current host.'
  >>> urllib.request.thishost()
  ('127.0.0.1', '127.0.1.1')

The attached patch will fix the mistake .
History
Date User Action Args
2011-10-04 23:02:51deokhwan.kimsetrecipients: + deokhwan.kim
2011-10-04 23:02:51deokhwan.kimsetmessageid: <1317769371.74.0.590194297783.issue13104@psf.upfronthosting.co.za>
2011-10-04 23:02:51deokhwan.kimlinkissue13104 messages
2011-10-04 23:02:51deokhwan.kimcreate