Message279522
That looks like a bug in urllib3 to me. The host is *not* '[2620:125:9014:3240:14:240:128:0]', the host is '2620:125:9014:3240:14:240:128:0'; the brackets are merely for disambiguating the port.
Compare to urllib.parse.urlsplit:
>>> from urllib.parse import urlsplit
>>> s = urlsplit('http://[2620:125:9014:3240:14:240:128:0]:8080/api/python')
>>> s.hostname
'2620:125:9014:3240:14:240:128:0'
>>> s.port
8080
>>> s.netloc
'[2620:125:9014:3240:14:240:128:0]:8080'
I'd recommend pursuing this with urllib3, but do take a look at existing IPv6 parsing issues there as a cursory glance at their bug tracker shows several of them.
That said, I don't know of any particular reason not to strip brackets in HTTPConnection anyway. Brackets cannot be part of a valid hostname, can they? |
|
Date |
User |
Action |
Args |
2016-10-27 03:13:52 | zach.ware | set | recipients:
+ zach.ware, martin.panter, cfs-pure |
2016-10-27 03:13:52 | zach.ware | set | messageid: <1477538032.82.0.221575160257.issue28539@psf.upfronthosting.co.za> |
2016-10-27 03:13:52 | zach.ware | link | issue28539 messages |
2016-10-27 03:13:52 | zach.ware | create | |
|