add host header to pathoc's CONNECT requests

This is required by the new HTTP RFCs.
This commit is contained in:
Maximilian Hils 2017-12-11 20:19:32 +01:00
parent b8cbb4dce8
commit 7f8a598097

View File

@ -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))