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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 5824bf805a Add tests for invalid ETag
5824bf805a is described below

commit 5824bf805acf68a4d58abe2d64070c574463a65f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Dec 12 11:44:31 2024 +0000

    Add tests for invalid ETag
---
 .../servlets/TestDefaultServletRfc9110Section13Parameterized.java   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
 
b/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
index c03548a47d..cb42bf05e1 100644
--- 
a/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
+++ 
b/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
@@ -81,6 +81,8 @@ public class TestDefaultServletRfc9110Section13Parameterized 
extends TomcatBaseT
                                 null, null, null, Boolean.FALSE, 
useStrongEtag.booleanValue() ? SC_200 : SC_412 });
                 parameterSets.add(new Object[] { useStrongEtag, 
Task.HEAD_INDEX_HTML, EtagPrecondition.NOT_IN,
                         dateCondition, null, null, null, Boolean.FALSE, SC_412 
});
+                parameterSets.add(new Object[] { useStrongEtag, 
Task.HEAD_INDEX_HTML, EtagPrecondition.INVALID,
+                        dateCondition, null, null, null, Boolean.FALSE, SC_400 
});
                 parameterSets.add(
                         new Object[] { useStrongEtag, Task.HEAD_INDEX_HTML, 
EtagPrecondition.INVALID_ALL_PLUS_OTHER,
                                 dateCondition, null, null, null, 
Boolean.FALSE, SC_400 });
@@ -169,6 +171,7 @@ public class 
TestDefaultServletRfc9110Section13Parameterized extends TomcatBaseT
         IN,
         ALL,
         NOT_IN,
+        INVALID,
         INVALID_ALL_PLUS_OTHER
     }
 
@@ -229,6 +232,9 @@ public class 
TestDefaultServletRfc9110Section13Parameterized extends TomcatBaseT
                     headerValues.add(strongETag.substring(0, 1) + "XXXXX" + 
strongETag.substring(6));
                 }
                 break;
+            case INVALID:
+                headerValues.add("invalid-no-quotes");
+                break;
             case INVALID_ALL_PLUS_OTHER:
                 headerValues.add("*");
                 headerValues.add("W/\"1abcd\"");


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

Reply via email to