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