提交 da529b03 编写于 作者: K kohsuke

adding a probe to better diagnose the missing Content-Length header issue.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8996 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6317d1e1
......@@ -22,6 +22,8 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Logger;
import java.util.logging.Level;
/**
* Has convenience methods to serve file system.
......@@ -181,6 +183,9 @@ public final class DirectoryBrowserSupport {
ContentInfo ci = baseFile.act(new ContentInfo());
if(LOGGER.isLoggable(Level.FINE))
LOGGER.fine("Serving "+baseFile+" with lastModified="+ci.lastModified+", contentLength="+ci.contentLength);
InputStream in = baseFile.read();
if (view) {
// for binary files, provide the file name for download
......@@ -413,4 +418,6 @@ public final class DirectoryBrowserSupport {
private static final long serialVersionUID = 1L;
}
private static final Logger LOGGER = Logger.getLogger(DirectoryBrowserSupport.class.getName());
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册