Index: /gsdl/trunk/cgi-bin/gliserver.pl
===================================================================
--- /gsdl/trunk/cgi-bin/gliserver.pl	(revision 19188)
+++ /gsdl/trunk/cgi-bin/gliserver.pl	(revision 19189)
@@ -494,5 +494,5 @@
     
     # language and region Environment Variable setting on the client side that was used to zip files.
-    my $client_lang = $gsdl_cgi->clean_param("lr");
+    my $lang_env = $gsdl_cgi->clean_param("lr") || "";
     $gsdl_cgi->delete("lr");
 
@@ -520,6 +520,5 @@
 	$java_args .= " gsdl3"; ## must this be done elsewhere as well?
     }
-    my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionShell $java_args"; 
-    $java_command = "LANG=$client_lang $java_command" if $client_lang;
+    my $java_command = "LANG=$lang_env \"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionShell $java_args"; 
 
     my $java_output = `$java_command`;
@@ -549,5 +548,5 @@
 
     # language and region Environment Variable setting on the client side that was used to zip files.
-    my $client_lang = $gsdl_cgi->clean_param("lr");
+    my $lang_env = $gsdl_cgi->clean_param("lr") || "";
     $gsdl_cgi->delete("lr");
    
@@ -571,6 +570,5 @@
     my $zip_file_path = &util::filename_cat($collect_directory, $collection . "-archives-" . $timestamp . ".zip");
     my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$collection\"";
-    my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionArchives $java_args"; 
-    $java_command = "LANG=$client_lang $java_command" if $client_lang;
+    my $java_command = "LANG=$lang_env \"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionArchives $java_args"; 
 
     my $java_output = `$java_command`;
@@ -596,5 +594,5 @@
 
     # language and region Environment Variable setting on the client side that was used to zip files.
-    my $client_lang = $gsdl_cgi->clean_param("lr");
+    my $lang_env = $gsdl_cgi->clean_param("lr") || "";
     $gsdl_cgi->delete("lr");
    
@@ -610,6 +608,5 @@
     my $zip_file_path = &util::filename_cat($collect_directory, "collection-configurations-" . $timestamp . ".zip");
     my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$username\" \"$user_groups\"";
-    my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionConfigurations $java_args"; 
-    $java_command = "LANG=$client_lang $java_command" if $client_lang;
+    my $java_command = "LANG=$lang_env \"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionConfigurations $java_args"; 
     my $java_output = `$java_command`;
     my $java_status = $?;
@@ -669,5 +666,5 @@
     }
     # language and region Environment Variable setting on the client side that was used to zip files.
-    my $client_lang = $gsdl_cgi->clean_param("lr");
+    my $lang_env = $gsdl_cgi->clean_param("lr") || "";
     $gsdl_cgi->delete("lr");
     my $file = $gsdl_cgi->clean_param("file");
@@ -702,6 +699,5 @@
     my $zip_file_path = &util::filename_cat($collection_directory, $collection . "-file-" . $timestamp . ".zip");
     my $java_args = "\"$zip_file_path\" \"$collection_directory\" \"$file\"";
-    my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; 
-    $java_command = "LANG=$client_lang $java_command" if $client_lang;
+    my $java_command = "LANG=$lang_env \"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; 
 
     my $java_output = `$java_command`;
@@ -729,5 +725,5 @@
 
     # language and region Environment Variable setting on the client side that was used to zip files.
-    my $client_lang = $gsdl_cgi->clean_param("lr");
+    my $lang_env = $gsdl_cgi->clean_param("lr") || "";
     $gsdl_cgi->delete("lr");
     my $file = $gsdl_cgi->clean_param("file");
@@ -755,6 +751,5 @@
     my $zip_file_path = &util::filename_cat($web_inf_directory, "webxml" . $timestamp . ".zip");
     my $java_args = "\"$zip_file_path\" \"$web_inf_directory\" \"$file\"";
-    my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; 
-    $java_command = "LANG=$client_lang $java_command" if $client_lang;
+    my $java_command = "LANG=$lang_env \"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; 
     my $java_output = `$java_command`;
 
@@ -799,4 +794,8 @@
 	$perl_args = $gsdl_cgi->clean_param("plugin") || "";
 	$gsdl_cgi->delete("plugin");
+    }
+    if ($script eq "downloadinfo.pl") {
+	$perl_args = $gsdl_cgi->clean_param("downloader") || "";
+	$gsdl_cgi->delete("downloader");
     }
 
@@ -1078,5 +1077,5 @@
     # zip files. This needs to be consistent on both client and server sides, otherwise zip 
     # and unzip seem to produce different values.
-    my $client_lang = $gsdl_cgi->clean_param("lr");
+    my $lang_env = $gsdl_cgi->clean_param("lr") || "";
     $gsdl_cgi->delete("lr");
 
@@ -1159,6 +1158,5 @@
 	my $java_classpath = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "java", "GLIServer.jar");
 	my $java_args = "\"$file_path\" \"$directory_path\"";
-	my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.Unzip $java_args"; 
-	$java_command = "LANG=$client_lang $java_command" if $client_lang;
+	my $java_command = "LANG=$lang_env \"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.Unzip $java_args"; 
 	my $java_output = `$java_command`;
 	my $java_status = $?;
