Alon Bar-Lev has uploaded a new change for review. Change subject: root: FileServlet: remove unneeded code ......................................................................
root: FileServlet: remove unneeded code Change-Id: I73440eec5b57839ef187c65d9435a8c448ffdc84 Signed-off-by: Alon Bar-Lev <[email protected]> --- M backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java 1 file changed, 3 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/15998/1 diff --git a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java b/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java index 5313c3c..093b9af 100644 --- a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java +++ b/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java @@ -94,13 +94,9 @@ // Locate the requested file: File file = ServletUtils.makeFileFromSanePath(request.getPathInfo(), base); file = checkForIndex(request, response, file, request.getPathInfo()); - if (file == null) { - response.sendError(HttpServletResponse.SC_NOT_FOUND); - } else { - // Send the content of the file: - // type is the default MIME type of the Servlet. - ServletUtils.sendFile(request, response, file, type); - } + // Send the content of the file: + // type is the default MIME type of the Servlet. + ServletUtils.sendFile(request, response, file, type); } protected File checkForIndex(HttpServletRequest request, HttpServletResponse response, File file, String path) throws IOException { @@ -124,8 +120,6 @@ log.error("There is no index page for directory \"" + file.getAbsolutePath() + "\", will send a 404 error response."); file = null; } - } else if (!ServletUtils.canReadFile(file)) { - file = null; } return file; } -- To view, visit http://gerrit.ovirt.org/15998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73440eec5b57839ef187c65d9435a8c448ffdc84 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
