From a3c05a35bb9dc85472068b48f6c235bbda24884f Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 18 Jul 2011 23:05:58 +0300 Subject: [PATCH] grr, add an all trusting ssl handler when downloading plugin from github --- .../org/elasticsearch/plugins/PluginManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginManager.java b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginManager.java index 5f27307e37c..b4a132f0121 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginManager.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/PluginManager.java @@ -107,40 +107,40 @@ public class PluginManager { pluginFile = new File(environment.pluginsFile(), name + ".zip"); if (version == null) { // try with ES version from downloads - URL pluginUrl = new URL("http://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + Version.number() + ".zip"); + URL pluginUrl = new URL("https://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + Version.number() + ".zip"); System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); try { downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out)); downloaded = true; } catch (IOException e) { // try a tag with ES version - pluginUrl = new URL("http://github.com/" + userName + "/" + repoName + "/zipball/v" + Version.number()); + pluginUrl = new URL("https://github.com/" + userName + "/" + repoName + "/zipball/v" + Version.number()); System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); try { downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out)); downloaded = true; } catch (IOException e1) { // download master - pluginUrl = new URL("http://github.com/" + userName + "/" + repoName + "/zipball/master"); + pluginUrl = new URL("https://github.com/" + userName + "/" + repoName + "/zipball/master"); System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); try { downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out)); downloaded = true; } catch (IOException e2) { - e2.printStackTrace(); + // ignore } } } } else { // download explicit version - URL pluginUrl = new URL("http://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + version + ".zip"); + URL pluginUrl = new URL("https://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + version + ".zip"); System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); try { downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out)); downloaded = true; } catch (IOException e) { // try a tag with ES version - pluginUrl = new URL("http://github.com/" + userName + "/" + repoName + "/zipball/v" + version); + pluginUrl = new URL("https://github.com/" + userName + "/" + repoName + "/zipball/v" + version); System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); try { downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out));