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
This commit is contained in:
Upayavira 2015-12-07 21:21:05 +00:00
parent bc51c86b4b
commit db65c81526
1 changed files with 6 additions and 1 deletions

View File

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