提交 9a3caa1d 编写于 作者: K kohsuke

Fixed a regression in 1.112. Adding more tests about i18n chars.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21325 71c3de6d-444a-0410-be80-ed276b4c234a
上级 feb3b5b5
......@@ -319,7 +319,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler-jelly</artifactId>
<version>1.112</version>
<version>1.114</version>
<exclusions>
<exclusion>
<groupId>dom4j</groupId>
......
......@@ -25,6 +25,7 @@ package hudson.model;
import hudson.FilePath;
import hudson.Util;
import hudson.Functions;
import hudson.util.IOException2;
import hudson.FilePath.FileCallable;
import hudson.remoting.VirtualChannel;
......
......@@ -2560,7 +2560,7 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
}
// the user is now authenticated, so send him back to the target
String path = req.getContextPath()+req.getRestOfPath();
String path = req.getContextPath()+req.getOriginalRestOfPath();
String q = req.getQueryString();
if(q!=null)
path += '?'+q;
......
......@@ -67,10 +67,22 @@ public class DirectoryBrowserSupportTest extends HudsonTestCase {
// create a problematic file name in the workspace
FreeStyleProject p = createFreeStyleProject();
p.getBuildersList().add(new Shell("touch abc\\\\def"));
p.getBuildersList().add(new Shell("touch abc\\\\def.bin"));
p.scheduleBuild2(0).get();
// can we see it?
new WebClient().goTo("job/"+p.getName()+"/ws/abc%5Cdef","application/octet-stream");
new WebClient().goTo("job/"+p.getName()+"/ws/abc%5Cdef.bin","application/octet-stream");
}
public void testNonAsciiChar() throws Exception {
if(Hudson.isWindows()) return; // can't test this on Windows
// create a problematic file name in the workspace
FreeStyleProject p = createFreeStyleProject();
p.getBuildersList().add(new Shell("touch \u6F22\u5B57.bin")); // Kanji
p.scheduleBuild2(0).get();
// can we see it?
new WebClient().goTo("job/"+p.getName()+"/ws/%e6%bc%a2%e5%ad%97.bin","application/octet-stream");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册