(tomcat) branch main updated: Add test case for bug 70144

[email protected]
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178611462092.1034450.13060000099211621641@gitbox3-he-fi.apache.org>
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new 9362c7d8b8 Add test case for bug 70144
9362c7d8b8 is described below

commit 9362c7d8b8ea230412d96424b946ebfe1eeee8bd
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Aug 7 15:56:53 2026 +0100

    Add test case for bug 70144
    
    Test case passes as expected. Bug looks to be invalid.
---
 .../apache/catalina/connector/TestConnector.java    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/test/org/apache/catalina/connector/TestConnector.java b/test/org/apache/catalina/connector/TestConnector.java
index e80c2953c3..ded4ea8532 100644
--- a/test/org/apache/catalina/connector/TestConnector.java
+++ b/test/org/apache/catalina/connector/TestConnector.java
@@ -215,4 +215,25 @@ public class TestConnector extends TomcatBaseTest {
             Assert.assertFalse(foundTrace);
         }
     }
+
+
+    @Test
+    public void doTestBug70144() throws Exception {
+        Tomcat tomcat = getTomcatInstance();
+
+        Context root = getProgrammaticRootContext();
+        Tomcat.addServlet(root, "default", new TesterServlet());
+        root.addServletMappingDecoded("/", "default");
+
+        Connector connector = tomcat.getConnector();
+        connector.setAllowBackslash(true);
+
+        tomcat.start();
+
+        ByteChunk body = new ByteChunk();
+        int rc = getUrl("http://localhost:" + getPort() + "/bug%5C70144", body, true);
+
+        Assert.assertEquals(200, rc);
+        Assert.assertEquals("OK", body.toString());
+    }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.