Skip to content

Commit 277163d

Browse files
sethmlarsonillia-v
andauthored
Update Lib/http/client.py
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
1 parent fc69621 commit 277163d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/http/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,8 @@ def _wrap_ipv6(self, ip):
977977

978978
def _tunnel(self):
979979
if _contains_disallowed_url_pchar_re.search(self._tunnel_host):
980-
raise ValueError('Invalid header value %r' % (self._tunnel_host,))
980+
raise ValueError('Tunnel host can't contain control characters %r'
981+
% (self._tunnel_host,))
981982
connect = b"CONNECT %s:%d %s\r\n" % (
982983
self._wrap_ipv6(self._tunnel_host.encode("idna")),
983984
self._tunnel_port,

0 commit comments

Comments
 (0)