提交 bcd7e87b 编写于 作者: M mindless

[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
上级 3fc6d397
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册