chen wu <wuche...@huawei.com> added the comment:

yeah, i noticed that. but this function also return host with '[]'.

183    # IPv6
184    if url and url[0] == '[':
185        host, url = url.split(']', 1)
186        host += ']'

if url is [aaa:bbb]:123, host is [aaa:bbb] and url is ':123'after this process.

when host=[aaa:bbb] passed to httplib.HTTPConnection, its function 'putrequest' 
will put 'Host:[[aaa:bbb]]:123' in headers.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34516>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to