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


The following commit(s) were added to refs/heads/main by this push:
     new 26ae3185b8 Correct test for Tomcat 11 HEAD behaviour
26ae3185b8 is described below

commit 26ae3185b8bbac251046ccd8c0590d1cec4be723
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 24 19:25:27 2023 +0100

    Correct test for Tomcat 11 HEAD behaviour
---
 test/org/apache/catalina/servlets/TestDefaultServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/servlets/TestDefaultServlet.java 
b/test/org/apache/catalina/servlets/TestDefaultServlet.java
index b67cc325d4..dca67ff9cb 100644
--- a/test/org/apache/catalina/servlets/TestDefaultServlet.java
+++ b/test/org/apache/catalina/servlets/TestDefaultServlet.java
@@ -636,10 +636,11 @@ public class TestDefaultServlet extends TomcatBaseTest {
         String length = resHeaders.get("Content-Length").get(0);
         Assert.assertEquals(Long.parseLong(length), out.getLength());
         out.recycle();
+        resHeaders.clear();
 
         rc = headUrl(path, out, resHeaders);
         Assert.assertEquals(HttpServletResponse.SC_OK, rc);
         Assert.assertEquals(0, out.getLength());
-        Assert.assertEquals(length, resHeaders.get("Content-Length").get(0));
+        Assert.assertNull(resHeaders.get("Content-Length"));
     }
 }


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

Reply via email to