Changeset 7690


Ignore:
Timestamp:
2004-07-01T17:30:34+12:00 (20 years ago)
Author:
kjdon
Message:

http_proxy environment vars don't seem to work under windows - put it back to having proxy stuff in the command for now, for windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/DownloadJob.java

    r7687 r7690  
    241241        }
    242242        if(user_pass.indexOf("@") != -1) {
    243         String user_name = user_pass.substring(0, user_pass.indexOf("@"));
    244         String user_pwd = user_pass.substring(user_pass.indexOf("@") + 1);
    245         proxy_url = user_name+":"+user_pwd+"@"+proxy_host+":"+proxy_port+"/";
    246         // Write the use proxy command - we don't do this anymore, instead we set environment variables - hopefully these can't be spied on like the follwoing can (using ps)
    247         //command = command + "-e httpproxy=" + proxy_host + ":" + proxy_port + "/ --proxy-user=" + user_pass.substring(0, user_pass.indexOf("@")) + " --proxy-passwd=" + user_pass.substring(user_pass.indexOf("@") + 1) + " -Y on ";
    248243       
     244        // Write the use proxy command - we don't do this anymore, instead we set environment variables - hopefully these can't be spied on like the follwoing can (using ps) - actually the environment stuff didn't work for windows, so lets go back to this
     245        if (Utility.isWindows()) {
     246            command = command + "-e httpproxy=" + proxy_host + ":" + proxy_port + "/ --proxy-user=" + user_pass.substring(0, user_pass.indexOf("@")) + " --proxy-passwd=" + user_pass.substring(user_pass.indexOf("@") + 1) + " -Y on ";
     247        } else {
     248            String user_name = user_pass.substring(0, user_pass.indexOf("@"));
     249            String user_pwd = user_pass.substring(user_pass.indexOf("@") + 1);
     250            proxy_url = user_name+":"+user_pwd+"@"+proxy_host+":"+proxy_port+"/";
     251        }
     252
    249253        }
    250254        else {
Note: See TracChangeset for help on using the changeset viewer.