Skip to content

Apache Lucene open-source search software

Fix smoke test to handle HTTPS dist URLs

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