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 a3e02419a3 Add additional test
a3e02419a3 is described below

commit a3e02419a34dfb3ab72f0b43158a1e9f7692b8e1
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jul 1 09:44:15 2026 +0100

    Add additional test
---
 .../apache/catalina/connector/TestInputBuffer.java | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/test/org/apache/catalina/connector/TestInputBuffer.java 
b/test/org/apache/catalina/connector/TestInputBuffer.java
index 32cf36501c..b55213d585 100644
--- a/test/org/apache/catalina/connector/TestInputBuffer.java
+++ b/test/org/apache/catalina/connector/TestInputBuffer.java
@@ -79,6 +79,29 @@ public class TestInputBuffer extends TomcatBaseTest {
     }
 
 
+    @Test
+    public void testLargeReadBufSize() throws Exception {
+        Tomcat tomcat = getTomcatInstance();
+        Context root = tomcat.addContext("", TEMP_DIR);
+        Tomcat.addServlet(root, "Echo", new Utf8Echo());
+        root.addServletMappingDecoded("/test", "Echo");
+
+        
Assert.assertTrue(tomcat.getConnector().setProperty("socket.appReadBufSize", 
"10500"));
+
+        tomcat.start();
+
+        
Assert.assertTrue(tomcat.getConnector().setProperty("socket.appReadBufSize", 
"10500"));
+        tomcat.start();
+
+        ByteChunk bc = new ByteChunk();
+        byte[] requestBody = new byte[95000];
+        Arrays.fill(requestBody, (byte) '0');
+        int rc = postUrl(requestBody, "http://localhost:"; + getPort() + 
"/test", bc, null);
+        Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+        Assert.assertEquals(requestBody.length, bc.getLength());
+    }
+
+
     private void doUtf8BodyTest(String description, int[] input, String 
expected) throws Exception {
 
         byte[] bytes = new byte[input.length];


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to