diff --git a/packaging/tests/tas-webdav/src/test/java/org/alfresco/webdav/UnlockFileTests.java b/packaging/tests/tas-webdav/src/test/java/org/alfresco/webdav/UnlockFileTests.java index c568a783c1..ba5df21133 100644 --- a/packaging/tests/tas-webdav/src/test/java/org/alfresco/webdav/UnlockFileTests.java +++ b/packaging/tests/tas-webdav/src/test/java/org/alfresco/webdav/UnlockFileTests.java @@ -198,4 +198,15 @@ public class UnlockFileTests extends WebDavTest .then().unlock() .and().assertThat().hasStatus(HttpStatus.NO_CONTENT.value()).and().assertThat().isUnlocked(); } + + @TestRail(section={TestGroup.PROTOCOLS, TestGroup.WEBDAV}, executionType= ExecutionType.SANITY, + description ="Checks no existent file is not locked (and status 404)") + @Test(groups = {TestGroup.PROTOCOLS, TestGroup.WEBDAV, TestGroup.SANITY}) + public void checkLockStatusForNonExistentFile() throws Exception + { + testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, content); + webDavProtocol.authenticateUser(dataUser.getAdminUser()). + usingResource(testFile). + assertThat().isUnlocked().assertThat().hasStatus(HttpStatus.NOT_FOUND.value()); + } } diff --git a/packaging/war/src/main/webapp/error.jsp b/packaging/war/src/main/webapp/error.jsp index 14c0e39e54..d06dba27a6 100644 --- a/packaging/war/src/main/webapp/error.jsp +++ b/packaging/war/src/main/webapp/error.jsp @@ -2,7 +2,7 @@ #%L Alfresco Repository WAR Community %% - Copyright (C) 2005 - 2016 Alfresco Software Limited + Copyright (C) 2005 - 2021 Alfresco Software Limited %% This file is part of the Alfresco software. If the software was purchased under a paid Alfresco license, the terms of @@ -35,15 +35,6 @@ <%@ page import="org.alfresco.service.cmr.module.ModuleInstallState" %> <%@ page import="java.util.Calendar" %> - -<% -// route WebDAV requests -if (request.getMethod().equalsIgnoreCase("PROPFIND") || request.getMethod().equalsIgnoreCase("OPTIONS")) -{ - response.sendRedirect(request.getContextPath() + "/webdav/"); -} -%> - <% WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext()); SysAdminParams sysAdminParams = (SysAdminParams)context.getBean("sysAdminParams");