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