raw.jsp revision ef604281b397eceb0d9f67b87378b7c0b751967d
0N/ASee LICENSE.txt included in this distribution for the specific
0N/Afile and include the License file at LICENSE.txt.
2362N/A--%><%@page import="java.io.File,
0N/AString path = request.getPathInfo();
0N/AString root = RuntimeEnvironment.getInstance().getSourceRootPath();
0N/Apath = file.getCanonicalPath();
0N/Aif (!path.startsWith(root) || !file.exists() || !file.canRead() || RuntimeEnvironment.getInstance().getIgnoredNames().ignore(file)) {
0N/A} else if (file.isDirectory()) {
0N/AString mimeType = getServletContext().getMimeType(file.getAbsolutePath());
0N/Aresponse.setContentType(mimeType);
0N/AString revision = request.getParameter("r");
0N/Aif (revision != null && revision.length() == 0) {
0N/A response.sendError(404, "Revision not found");
0N/AOutputStream o = response.getOutputStream();