Author cfs-pure
Recipients cfs-pure, martin.panter
Date 2016-10-27.00:35:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Our internal use case is happening through requests via urllib3 for parsing.

Essentially requests is taking the URL, passing it to urllib3 for parsing.  urllib3 is returning a namedtuple of type Url which includes a host and port property which is being fed to httplib.  Essentially:

>>> import urllib3
>>> import httplib
>>> orig_url = 'http://[2620:125:9014:3240:14:240:128:0]:8080/api/python'
>>> u1 = urllib3.util.parse_url(orig_url)
>>> u1
Url(scheme='http', auth=None, host='[2620:125:9014:3240:14:240:128:0]', port=8080, path='/api/python', query=None, fragment=None)
>>> c1 = httplib.HTTPConnection(, port=u1.port)
>>>, c1.port
('[2620:125:9014:3240:14:240:128:0]', 8080)
>>> c1.request('GET', '/api/json')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/", line 979, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/", line 1013, in _send_request
  File "/usr/lib/python2.7/", line 975, in endheaders
  File "/usr/lib/python2.7/", line 835, in _send_output
  File "/usr/lib/python2.7/", line 797, in send
  File "/usr/lib/python2.7/", line 778, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
Date User Action Args
2016-10-27 00:35:19cfs-puresetrecipients: + cfs-pure, martin.panter
2016-10-27 00:35:19cfs-puresetmessageid: <>
2016-10-27 00:35:19cfs-purelinkissue28539 messages
2016-10-27 00:35:18cfs-purecreate