We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc69621 commit 277163dCopy full SHA for 277163d
Lib/http/client.py
@@ -977,7 +977,8 @@ def _wrap_ipv6(self, ip):
977
978
def _tunnel(self):
979
if _contains_disallowed_url_pchar_re.search(self._tunnel_host):
980
- raise ValueError('Invalid header value %r' % (self._tunnel_host,))
+ raise ValueError('Tunnel host can't contain control characters %r'
981
+ % (self._tunnel_host,))
982
connect = b"CONNECT %s:%d %s\r\n" % (
983
self._wrap_ipv6(self._tunnel_host.encode("idna")),
984
self._tunnel_port,
0 commit comments