Merge pull request #2662 from mhils/pathod-connect-host

Add host header to pathoc's CONNECT requests
This commit is contained in:
Aldo Cortesi 2017-12-12 21:54:27 +13:00 committed by GitHub
commit 472d122c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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