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

Thanks so much for your reply. 

when httplib.HTTPConnection is inited with host [fc00::0a08::2] and port 35357, 
we can make a request normally. only the 'Host' set in header is wrong. I think 
the most simple way to fix this is adding judgement condition, maybe like this:
974                    # Wrap the IPv6 Host Header with [] (RFC 2732)
975                    if host_enc.find(':') >= 0 and host_enc.find(']') < 0:
976                        host_enc = "[" + host_enc + "]"

or rules should be given, because when port is not default, only 
(host=[aaa:bbb]:123, port=None) and (host=aaa:bbb, port=123) are valid for 
httplib now.

so sorry for my poor English. hope you can understand what im saying. :)

----------

_______________________________________
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