[FIXED HUDSON-4392] call Util.rawEncode on slaveName in jnlp url

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21556 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
mindless committed 2009-09-09 18:51:33 +00:00
1 parent 3fc6d397ac
commit bcd7e87b0d
1 file changed
+2 -1
@@ -24,6 +24,7 @@
package hudson.lifecycle;
import hudson.Launcher.LocalLauncher;
import hudson.Util;
import hudson.remoting.Callable;
import hudson.remoting.Engine;
import hudson.remoting.jnlp.MainDialog;
@@ -116,7 +117,7 @@ public class WindowsSlaveInstaller implements Callable<Void,RuntimeException>, A
FileUtils.copyURLToFile(getClass().getResource("/windows-service/hudson.exe"), slaveExe);
// write out the descriptor
URL jnlp = new URL(engine.getHudsonUrl(),"computer/"+engine.slaveName+"/slave-agent.jnlp");
URL jnlp = new URL(engine.getHudsonUrl(),"computer/"+Util.rawEncode(engine.slaveName)+"/slave-agent.jnlp");
String xml = generateSlaveXml(System.getProperty("java.home")+"\\bin\\java.exe", "-jnlpUrl "+jnlp.toExternalForm());
FileUtils.writeStringToFile(new File(dir, "hudson-slave.xml"),xml,"UTF-8");