From db65c815262f911c49f918f02a1393e5ca76736d Mon Sep 17 00:00:00 2001 From: Upayavira Date: Mon, 7 Dec 2015 21:21:05 +0000 Subject: [PATCH] Fix smoke test to handle HTTPS dist URLs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1718469 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/smokeTestRelease.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py index 03bd1f0c5ec..1e06a5a92ae 100644 --- a/dev-tools/scripts/smokeTestRelease.py +++ b/dev-tools/scripts/smokeTestRelease.py @@ -84,7 +84,12 @@ def getHREFs(urlString): # Deref any redirects while True: url = urllib.parse.urlparse(urlString) - h = http.client.HTTPConnection(url.netloc) + if url.scheme == "http": + h = http.client.HTTPConnection(url.netloc) + elif url.scheme == "https": + h = http.client.HTTPSConnection(url.netloc) + else: + raise RuntimeError("Unknown protocol: %s" % url.scheme) h.request('GET', url.path) r = h.getresponse() newLoc = r.getheader('location')