mirror of https://github.com/apache/lucene.git
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:
parent
bc51c86b4b
commit
db65c81526
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue