提交 c30ccd6b 编写于 作者: K kohsuke

set the file name to assist manual download

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17236 71c3de6d-444a-0410-be80-ed276b4c234a
上级 db463e4c
......@@ -345,6 +345,9 @@ public abstract class Slave extends Node implements Serializable {
public void doIndex( StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
URLConnection con = connect();
// since we end up redirecting users to jnlpJars/foo.jar/, set the content disposition
// so that browsers can download them in the right file name.
rsp.setHeader("Content-Disposition", "inline; filename=" + fileName);
InputStream in = con.getInputStream();
rsp.serveFile(req, in, con.getLastModified(), con.getContentLength(), "*.jar" );
in.close();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册