Commit Diff


commit - 2e0d560d88c38f5c9ad682cc3659e20359a276a3
commit + 401c2cd43f6a22402e0ad686dce31a6e150d7cdc
blob - 6d6d48e8c9190758f892902e54739c3a5d3291d2
blob + 0e46f850aedb624315d4fff5d5c030d9c0963edc
--- yah2g.py
+++ yah2g.py
@@ -117,7 +117,7 @@ class _RequestHandler(BaseHTTPRequestHandler):
                     context.check_hostname = False
                     context.verify_mode = ssl.CERT_NONE
                     with socket.create_connection((parsed.hostname, parsed.port or 1965)) as raw_s:
-                        with context.wrap_socket(raw_s) as s:
+                        with context.wrap_socket(raw_s, server_hostname=parsed.hostname) as s:
                             s.sendall((url + '\r\n').encode("UTF-8"))
                             fp = s.makefile("rb")
                             splitted = fp.readline().decode("UTF-8").strip().split(maxsplit=1)