diff --git a/core/src/main/java/hudson/model/Hudson.java b/core/src/main/java/hudson/model/Hudson.java index bed94aed96adf159ba0ced0cef8379b8ab9974f0..b97b3dde96e7fece2d79ddae61bba390eb8faaab 100644 --- a/core/src/main/java/hudson/model/Hudson.java +++ b/core/src/main/java/hudson/model/Hudson.java @@ -174,7 +174,6 @@ import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST; import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; import java.io.File; import java.io.FileFilter; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; @@ -2768,46 +2767,6 @@ public final class Hudson extends Node implements ItemGroup, Stapl } } - /** - * Serves static resources without the "Last-Modified" header to work around - * a bug in Firefox. - * - *

- * See https://bugzilla.mozilla.org/show_bug.cgi?id=89419 - */ - public void doNocacheImages( StaplerRequest req, StaplerResponse rsp ) throws IOException { - String path = req.getRestOfPath(); - - if(path.length()==0) - path = "/"; - - if(path.indexOf("..")!=-1 || path.length()<1) { - // don't serve anything other than files in the artifacts dir - rsp.sendError(SC_BAD_REQUEST); - return; - } - - File f = new File(req.getServletContext().getRealPath("/images"),path.substring(1)); - if(!f.exists()) { - rsp.sendError(SC_NOT_FOUND); - return; - } - - if(f.isDirectory()) { - // listing not allowed - rsp.sendError(HttpServletResponse.SC_FORBIDDEN); - return; - } - - FileInputStream in = new FileInputStream(f); - // serve the file - String contentType = req.getServletContext().getMimeType(f.getPath()); - rsp.setContentType(contentType); - rsp.setContentLength((int)f.length()); - Util.copyStream(in,rsp.getOutputStream()); - in.close(); - } - /** * For debugging. Expose URL to perform GC. */ diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java index b5edb73514f7833d1c9cd7606dfd04d49e631092..b4135ddb8bdf501207591cbb11287fdf1d657f68 100644 --- a/core/src/main/java/hudson/model/Job.java +++ b/core/src/main/java/hudson/model/Job.java @@ -1116,8 +1116,7 @@ public abstract class Job, RunT extends Run,RunT extends Run