Apache Lucene open-source search software
LUCENE-9288: poll_mirrors.py release script can handle HTTPS mirrors (#1520)
Ignacio Vera98ef96ccbb4a
diff --git a/dev-tools/scripts/poll-mirrors.py b/dev-tools/scripts/poll-mirrors.pyindex 9a96a756cc4..7a94a29461c 100755--- a/dev-tools/scripts/poll-mirrors.py+++ b/dev-tools/scripts/poll-mirrors.py@@ -44,8 +44,10 @@ def p(s):def mirror_contains_file(url):url = urlparse(url)-- if url.scheme == 'http':++ if url.scheme == 'https':+ return https_file_exists(url)+ elif url.scheme == 'http':return http_file_exists(url)elif url.scheme == 'ftp':return ftp_file_exists(url)@@ -65,6 +67,18 @@ def http_file_exists(url):return exists+def https_file_exists(url):+ exists = False++ try:+ conn = http.HTTPSConnection(url.netloc)+ conn.request('HEAD', url.path)+ response = conn.getresponse()+ exists = response.status == 200+ except:+ pass++ return existsdef ftp_file_exists(url):listing = []@@ -112,7 +126,7 @@ except Exception as e:sys.exit(1)mirror_path = args.path if args.path is not None else 'lucene/java/{}/changes/Changes.html'.format(args.version)-maven_url = None if args.version is None else 'http://repo1.maven.org/maven2/' \+maven_url = None if args.version is None else 'https://repo1.maven.org/maven2/' \'org/apache/lucene/lucene-core/{0}/lucene-core-{0}.pom.asc'.format(args.version)maven_available = Falsediff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 6eb4048b856..ce8494db2f5 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -275,6 +275,8 @@ Other* LUCENE-9358: Change the way the multi-dimensional BKD tree builder generates the intermediate tree representation to beequal to the one dimensional case to avoid unnecessary tree and leaves rotation. (Ignacio Vera)+* LUCENE-9288: poll_mirrors.py release script can handle HTTPS mirrors. (Ignacio Vera)+Build* Upgrade forbiddenapis to version 3.0. (Uwe Schindler)