From 7f8a598097e50072f5e2da78f7c1b97225f97c5a Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 11 Dec 2017 20:19:32 +0100 Subject: add host header to pathoc's CONNECT requests This is required by the new HTTP RFCs. --- pathod/pathoc.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pathod') diff --git a/pathod/pathoc.py b/pathod/pathoc.py index e1052750..20a915c0 100644 --- a/pathod/pathoc.py +++ b/pathod/pathoc.py @@ -244,6 +244,7 @@ class Pathoc(tcp.TCPClient): port=connect_to[1], path=None, http_version='HTTP/1.1', + headers=[(b"Host", connect_to[0].encode("idna"))], content=b'', ) self.wfile.write(net_http.http1.assemble_request(req)) -- cgit v1.2.3