Ignore:
Timestamp:
2009-04-21T18:55:32+12:00 (15 years ago)
Author:
ak19
Message:

GLI and gliserver.pl have been updated together to deal with inconsistent Zipping environment. When testing on Linux, LANG variable was set on the GLI (client) side but not set on server side. This resulted in special characters in filenames being unzipped differently from their originals on the client side, or if the LANG env var had been set to be the same on the server end as it was on the client end when the zipping took place. Now the client passes the LANG variable to every upload and download gliserver command. The client gets and stores the LANG variable only once though (on creating the RemoteGreenstoneServer object) since the System.getenv() method is deprecated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java

    r17630 r19173  
    6262    // static private PasswordAuthentication remote_greenstone_server_authentication = new PasswordAuthentication(System.getProperty("user.name"), new char[] { });
    6363
     64    // the language and region environment variables (in "lang_REGION" form)
     65    // this is necessary in order for the client and server sides to zip and unzip
     66    // using the same settings
     67    public final String lang_region;
     68
    6469    private ActionQueue remote_greenstone_server_action_queue;
    6570    private RemoteGreenstoneServer.ProgressBar progress_bar;
     
    7075    progress_bar = new RemoteGreenstoneServer.ProgressBar();
    7176    remote_greenstone_server_action_queue = new ActionQueue();
     77
     78    String langReg = System.getenv("LANG");
     79    lang_region = (langReg == null) ? "" : langReg;
    7280    }
    7381
     
    481489        String gliserver_url_string = Configuration.gliserver_url.toString();
    482490        String command_output = sendCommandToServerInternal(gliserver_url_string, gliserver_args, shell);
    483        
     491               
     492        // Debugging - print any ok messages to stderr
     493        //if(!(command_output.trim().startsWith("<"))) {
     494        //System.err.println("**** RECEIVED (sendCommandToServer()): " + command_output);
     495        //}
     496       
    484497        // Check the first line to see if authentication has failed; if so, go around the loop again
    485498        if (command_output.startsWith("ERROR: Authentication failed:")) {
Note: See TracChangeset for help on using the changeset viewer.