- Timestamp:
- 2017-08-11T17:07:44+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java
r31860 r31877 104 104 String[] command = (String[]) commands.toArray(new String[0]); 105 105 DebugStream.println("Getting server info: "+commands); 106 try { 107 String [] env = null; 106 try { 108 107 SafeProcess prcs = null; 109 108 110 if (Utility.isWindows()) { 111 prcs = new SafeProcess(command); 112 } 113 else { 114 if (proxy_url != null && !proxy_url.equals("")) { 109 if (proxy_url != null && !proxy_url.equals("")) { 115 110 // Specify proxies as environment variables 116 111 // Need to manually specify GSDLHOME and GSDLOS also 117 env = new String[6]; 118 proxy_url = proxy_url.replaceAll("http://",""); 119 env[0] = "http_proxy=http://"+proxy_url; 120 env[1] = "https_proxy=http://"+proxy_url; // yes, HTTP protocol for https:// too 112 113 proxy_url = proxy_url.replaceAll("http://",""); 114 115 String [] env = new String[7]; 116 117 env[0] = "http_proxy=http://"+proxy_url; 118 env[1] = "https_proxy=http://"+proxy_url; // yes, HTTP protocol for https:// too 121 119 // see also https://wiki.archlinux.org/index.php/proxy_settings 122 120 env[2] = "ftp_proxy=ftp://"+proxy_url; 123 121 env[3] = "GSDLHOME=" + Configuration.gsdl_path; 124 122 env[4] = "GSDLOS=" + Gatherer.client_operating_system; 125 123 env[5] = "WGETRC=" + LocalGreenstone.getBinOSDirectoryPath(Gatherer.client_operating_system)+"wgetrc"; // teach it where the wgetrc file lives, in gs2build/bin/<os> 124 // If PATH is not made available, so that Perl is not on the PATH, then WgetDownload.pm's open3() call 125 // to run wget fails with cryptic failure message. So make PATH available for open3(): 126 env[6] = "PATH="+System.getenv("PATH"); 127 126 128 prcs = new SafeProcess(command, env, null); 127 129 } … … 130 132 prcs = new SafeProcess(command); 131 133 } 132 }133 134 134 135 // special processing of Process' stderr stream:
Note:
See TracChangeset
for help on using the changeset viewer.