You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by nk...@apache.org on 2016/02/08 23:35:54 UTC

[19/50] [abbrv] lucene-solr git commit: Fix smoke test to handle HTTPS dist URLs

Fix smoke test to handle HTTPS dist URLs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_5_4@1718471 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b5fb6d32
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b5fb6d32
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b5fb6d32

Branch: refs/heads/branch_5_4
Commit: b5fb6d32289c31f2548982dde762988d3d6ea4fa
Parents: c0d9de4
Author: Upayavira <up...@apache.org>
Authored: Mon Dec 7 21:21:44 2015 +0000
Committer: Upayavira <up...@apache.org>
Committed: Mon Dec 7 21:21:44 2015 +0000

----------------------------------------------------------------------
 dev-tools/scripts/smokeTestRelease.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b5fb6d32/dev-tools/scripts/smokeTestRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index aa2064d..5a4cdfd 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')