From f1b72a50c3822203d32e81661489b7d82475d08a Mon Sep 17 00:00:00 2001 From: Xiami Date: Thu, 14 Dec 2017 18:32:48 +0800 Subject: [PATCH 2/2] selectors.py: use original url for https sites Replacing host name with IP in URLs makes ssl cert name check failed. --- mirrorselect/selectors.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py index aee1b52..cb730dc 100644 --- a/mirrorselect/selectors.py +++ b/mirrorselect/selectors.py @@ -416,6 +416,9 @@ class Deep(object): """ early_out = False f = None + # Unconditionally restore IP to server name because ssl verifies hostname + if url_parts.scheme == "https": + test_url = url_unparse(url_parts) try: try: signal.alarm(self._connect_timeout) -- 2.13.6