Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Lib/http/client.py
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
  • Loading branch information
sethmlarson and illia-v authored Apr 10, 2026
commit 277163d3cee1ef360eda1dac94294fba56417fef
3 changes: 2 additions & 1 deletion Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,8 @@ def _wrap_ipv6(self, ip):

def _tunnel(self):
if _contains_disallowed_url_pchar_re.search(self._tunnel_host):
raise ValueError('Invalid header value %r' % (self._tunnel_host,))
raise ValueError('Tunnel host can't contain control characters %r'
% (self._tunnel_host,))
connect = b"CONNECT %s:%d %s\r\n" % (
self._wrap_ipv6(self._tunnel_host.encode("idna")),
self._tunnel_port,
Expand Down
Loading