[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-09-04 Thread chen wu
chen wu added the comment: to fix this, we change the code of our urilib3. before passing params to httplib, we set Host in headers if it's ipv6 address. Thanks so much. -- resolution: duplicate -> not a bug stage: -> resolved status: pending -> closed

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-28 Thread Martin Panter
Martin Panter added the comment: This sounds like a duplicate of Issue 28539. My understanding of that report is that Urllib3 half parses the URL by splitting out the port number, but returns a hostname with square brackets intact. Requests then passes the hostname (string with brackets) and

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-28 Thread chen wu
chen wu added the comment: yeah, i noticed that. but this function also return host with '[]'. 183# IPv6 184if url and url[0] == '[': 185host, url = url.split(']', 1) 186host += ']' if url is [aaa:bbb]:123, host is [aaa:bbb] and url is ':123'after this process. when

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: urrlib3 seems to handle this case at https://github.com/urllib3/urllib3/blob/c41fa8c7ed8cb7315195dc15e67958754ea276d5/src/urllib3/util/url.py#L184 . Test cases :

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-27 Thread chen wu
chen wu 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

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-27 Thread Prudvi RajKumar Maddala
Prudvi RajKumar Maddala added the comment: I don't think urllib module is part of core python library. It's a 3rd party library which we usually install using pip -- nosy: +prudvinit ___ Python tracker

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-27 Thread chen wu
New submission from chen wu : when I tried to request a url like "https://[fc00:0a08::2]:35357", I got 400. The code is like: import requests requests.get("https://[fc00:0a08::2]:35357;, verify=False) And the apache logs: vhost.c(889): [client fc00:ac1c::9a5:58692] AH00550: Client