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,
422N/AString path = request.getPathInfo();
422N/AString root = RuntimeEnvironment.getInstance().getSourceRootPath();
422N/Apath = file.getCanonicalPath();
422N/Aif (!path.startsWith(root) || !file.exists() || !file.canRead() || RuntimeEnvironment.getInstance().getIgnoredNames().ignore(file)) {
422N/A} else if (file.isDirectory()) {
422N/AString mimeType = getServletContext().getMimeType(file.getAbsolutePath());
422N/Aresponse.setContentType(mimeType);
422N/AString revision = request.getParameter("r");
422N/Aif (revision != null && revision.length() == 0) {
422N/A response.sendError(404, "Revision not found");
422N/AOutputStream o = response.getOutputStream();