On 27/01/2023 14:11, Rémy Maucherat wrote:
On Fri, Jan 27, 2023 at 2:51 PM <ma...@apache.org> wrote:

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit ce8621750e4f74229bffa7e42e648523b91b91de
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Jan 27 12:57:39 2023 +0000

     Redirect no longer required for root mapping

But this would break directory listing for the webapp root right ?

In the case where a servlet is mapped to the context root, yes. There would be no way to pass a request to '/' to the default servlet.

Note that ROOT already effecively behaved like this.

There is plenty of time to re-raise this with the Jakarta Servlet project if we wish. This was an area where the various containers weren't consistent so there may be scope to opt for a different solution.

Mark


Rémy

---
  .../servlet/annotation/TestServletSecurityMappings.java        | 10 +++-------
  1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/test/jakarta/servlet/annotation/TestServletSecurityMappings.java 
b/test/jakarta/servlet/annotation/TestServletSecurityMappings.java
index 60440ea0fe..e438ae563e 100644
--- a/test/jakarta/servlet/annotation/TestServletSecurityMappings.java
+++ b/test/jakarta/servlet/annotation/TestServletSecurityMappings.java
@@ -118,14 +118,10 @@ public class TestServletSecurityMappings extends 
TomcatBaseTest {

          // Root
          rc = getUrl("http://localhost:"; + getPort() + "/test", bc, false);
-        if (redirectContextRoot) {
-            Assert.assertEquals(302, rc);
+        if (secureRoot || secureDefault) {
+            Assert.assertEquals(403, rc);
          } else {
-            if (secureRoot || secureDefault) {
-                Assert.assertEquals(403, rc);
-            } else {
-                Assert.assertEquals(200, rc);
-            }
+            Assert.assertEquals(200, rc);
          }
      }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to