raw.jsp revision 5e43c87216dfeda97c475a542b371b958b13fed5
0N/ASee LICENSE.txt included in this distribution for the specific
200N/Afile and include the License file at LICENSE.txt.
200N/A--%><%@page import="java.io.File,
0N/AString path = request.getPathInfo();
0N/ARuntimeEnvironment env = RuntimeEnvironment.getInstance();
200N/AFile file = new File(env.getSourceRootPath(), path);
200N/A path = env.getPathRelativeToSourceRoot(file, 0);
if (!file.exists() || !file.canRead() || RuntimeEnvironment.getInstance().getIgnoredNames().ignore(file)) {
} else if (file.isDirectory()) {
String mimeType = getServletContext().getMimeType(file.getAbsolutePath());
response.setContentType(mimeType);
String revision = request.getParameter("r");
if (revision != null && revision.length() == 0) {
response.sendError(404, "Revision not found");
OutputStream o = response.getOutputStream();
while ((nr = in.read(buffer)) > 0) {
o.write(buffer, 0, nr);
o.flush();
o.close();