raw.jsp revision 1063
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();
1063N/ARuntimeEnvironment env = RuntimeEnvironment.getInstance();
1063N/AFile file = new File(env.getSourceRootPath(), path);
1063N/A path = env.getPathRelativeToSourceRoot(file, 0);
1063N/Aif (!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();