Index: /main/trunk/gli/src/org/greenstone/gatherer/download/DownloadJob.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/download/DownloadJob.java	(revision 31819)
+++ /main/trunk/gli/src/org/greenstone/gatherer/download/DownloadJob.java	(revision 31820)
@@ -623,10 +623,12 @@
 		    // Specify proxies as environment variables
 		    // Need to manually specify GSDLHOME and GSDLOS also
-		    env = new String[4];
+		    env = new String[5];
                     proxy_url = proxy_url.replaceAll("http://","");
 		    env[0] = "http_proxy=http://"+proxy_url;
-		    env[1] = "ftp_proxy=ftp://"+proxy_url;
-		    env[2] = "GSDLHOME=" + Configuration.gsdl_path;
-		    env[3] = "GSDLOS=" + Gatherer.client_operating_system;
+		    env[1] = "https_proxy=http://"+proxy_url; // HTTP protocol for https:// too
+		                // see also https://wiki.archlinux.org/index.php/proxy_settings
+		    env[2] = "ftp_proxy=ftp://"+proxy_url;
+		    env[3] = "GSDLHOME=" + Configuration.gsdl_path;
+		    env[4] = "GSDLOS=" + Gatherer.client_operating_system;
 
 		    prcs = new SafeProcess(cmd, env, null);
Index: /main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java	(revision 31819)
+++ /main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java	(revision 31820)
@@ -115,10 +115,12 @@
 		    // Specify proxies as environment variables
 		    // Need to manually specify GSDLHOME and GSDLOS also
-		    env = new String[4];
+		    env = new String[5];
                     proxy_url = proxy_url.replaceAll("http://","");
 		    env[0] = "http_proxy=http://"+proxy_url;
-		    env[1] = "ftp_proxy=ftp://"+proxy_url;
-		    env[2] = "GSDLHOME=" + Configuration.gsdl_path;
-		    env[3] = "GSDLOS=" + Gatherer.client_operating_system;
+		    env[1] = "https_proxy=http://"+proxy_url; // yes, HTTP protocol for https:// too
+		                   // see also https://wiki.archlinux.org/index.php/proxy_settings
+		    env[2] = "ftp_proxy=ftp://"+proxy_url;
+		    env[3] = "GSDLHOME=" + Configuration.gsdl_path;
+		    env[4] = "GSDLOS=" + Gatherer.client_operating_system;
 		    prcs = new SafeProcess(command, env, null);
 		} 
Index: /main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java	(revision 31819)
+++ /main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java	(revision 31820)
@@ -91,4 +91,5 @@
     private TreePath previous_path;
     private String proxy_url = "";
+    private Proxy proxyObject = null;
 	    
     /** Main System code */
@@ -604,11 +605,21 @@
      * @return the redirect url for the given url if any redirection is involved, or the
      * url_str.
+     *
+     * Adding another useful URL on setting Java System Properties:
+     * https://stackoverflow.com/questions/12181843/using-java-to-download-files-from-a-https-url
      */
     private String getRedirectURL(String url_str) {
+	boolean noMoreRedirects = false;
+	
+	//System.err.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
 	HttpURLConnection connection = null;
-	if(url_str.startsWith("http:")) { // only test http urls
+	if(url_str.startsWith("http:") || url_str.startsWith("https:")) { // only test http urls
 	    try {
-		URL url = new URL(url_str); 
-		connection = (HttpURLConnection)url.openConnection(); //new HttpURLConnection(url);
+		URL url = new URL(url_str);
+		if(this.proxyObject == null) {
+		    connection = (HttpURLConnection)url.openConnection(); //new HttpURLConnection(url);
+		} else {
+		    connection = (HttpURLConnection)url.openConnection(proxyObject);
+		}
 		// don't let it automatically follow redirects, since we want to
 		// find out whether we are dealing with redirects in the first place
@@ -619,14 +630,19 @@
 		// HTTP Codes 3xx are redirects, http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
 		int responseCode = connection.getResponseCode();
+		//System.err.println("@@@ response code was " + responseCode);
 		if(responseCode >= 300 && responseCode < 400) { 
-		    String responseMsg = connection.getResponseMessage();
+		    //String responseMsg = connection.getResponseMessage();
+		    //System.err.println("@@@ response msg: " + responseMsg);
 
 		    // Get the Location header since this specifies the new location of the resource
 		    String location = connection.getHeaderField("Location");
-		    
+
+		    //System.err.println("@@@ Old URL: |" + url_str + "|");
+		    //System.err.println("@@@ LOCATION: |" + location + "|");
 		    // this becomes the url that wget should download from
 		    url_str = location.trim();
-		}
-		
+		} else {
+		   noMoreRedirects = true; 
+		}		
 		connection.disconnect();
 	    } catch(Exception e) {
@@ -639,5 +655,12 @@
 	} 
 
-	return url_str;
+	if(noMoreRedirects) {
+	    //System.err.println("@@@ Found url_str " + url_str);
+	    //System.err.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
+	    return url_str;
+	}
+	else { // continue checking for whether the new URL redirects elsewhere again
+	    return getRedirectURL(url_str);
+	}
     }
 
@@ -715,4 +738,10 @@
 	    }
 
+	    // https://askubuntu.com/questions/664777/systemwide-proxy-settings-in-ubuntu
+	    // http://www.rgagnon.com/javadetails/java-0085.html
+	    // how-do-i-make-httpurlconnection-use-a-proxy
+	    // https://stackoverflow.com/questions/8030908/how-to-check-if-proxy-is-working-in-java
+	    proxyObject = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxy_host, Integer.parseInt(proxy_port)));
+
 	    if(user_pass.indexOf("@") != -1) {
 			
@@ -773,18 +802,16 @@
             if (!checkProxy() || !checkURL(false) )return;
 
-
 	    if(server_info != null) {
 		server_info.dispose();
 	    }
-
-	   
+	    
 	    Argument arg_url = current_download.getArgument("url");
 	    String str_url = "";
-
 	    if( arg_url!= null && arg_url.isAssigned()) {
 		str_url = arg_url.getValue();
 	    }
 
-            
+	    str_url = getRedirectURL(str_url); // work out the real URL
+
  	    server_info = new ServerInfoDialog(str_url ,proxy_url, mode,(Download)download_map.get(mode));
  	    
