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 66929e9314 Avoid chunked response in TestManagerWebapp jmxproxy request
66929e9314 is described below

commit 66929e9314375c3a4800563a17a433a0f0987c87
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 2 22:50:35 2026 +0000

    Avoid chunked response in TestManagerWebapp jmxproxy request
    
    The test client does not remove the chunk framing so a chunk boundary could
    split the string the test searches for. Use HTTP/1.0 so the response is not
    chunked.
    
    Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
 test/org/apache/catalina/manager/TestManagerWebapp.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/manager/TestManagerWebapp.java 
b/test/org/apache/catalina/manager/TestManagerWebapp.java
index 01d0244afc..a21f1d0961 100644
--- a/test/org/apache/catalina/manager/TestManagerWebapp.java
+++ b/test/org/apache/catalina/manager/TestManagerWebapp.java
@@ -137,9 +137,11 @@ public class TestManagerWebapp extends TomcatBaseTest {
         Assert.assertEquals(HttpServletResponse.SC_OK, client.getStatusCode());
         Assert.assertTrue(client.getResponseBody(), 
client.getResponseBody().contains("MiB"));
 
+        // HTTP/1.0 so the response is not chunked. The client does not remove 
the chunk framing and it could
+        // split the string that is searched for.
         // @formatter:off
         client.setRequest(new String[] {
-                "GET /manager/jmxproxy HTTP/1.1" + CRLF +
+                "GET /manager/jmxproxy HTTP/1.0" + CRLF +
                     "Host: localhost" + CRLF +
                     "Authorization: " + basicHeader + CRLF +
                     "Connection: Close" + CRLF +


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

Reply via email to