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 bd51b8b57f Expand tests to cover If-None-Match
bd51b8b57f is described below
commit bd51b8b57f8347abee210c063f69967fc0367813
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Dec 12 12:39:07 2024 +0000
Expand tests to cover If-None-Match
---
...efaultServletRfc9110Section13Parameterized.java | 24 ++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git
a/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
b/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
index 00ca332d54..38e575d3b0 100644
---
a/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
+++
b/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
@@ -96,8 +96,8 @@ public class TestDefaultServletRfc9110Section13Parameterized
extends TomcatBaseT
Boolean.FALSE, SC_200 });
parameterSets.add(new Object[] { useStrongEtag, task, null,
DatePrecondition.MULTI_IN, null, null, null,
Boolean.FALSE, SC_200 });
- parameterSets.add(new Object[] { useStrongEtag, task, null,
DatePrecondition.MULTI_IN_REV, null, null, null,
- Boolean.FALSE, SC_200 });
+ parameterSets.add(new Object[] { useStrongEtag, task, null,
DatePrecondition.MULTI_IN_REV, null, null,
+ null, Boolean.FALSE, SC_200 });
parameterSets.add(new Object[] { useStrongEtag, task, null,
DatePrecondition.INVALID, null, null, null,
Boolean.FALSE, SC_200 });
@@ -112,6 +112,22 @@ public class
TestDefaultServletRfc9110Section13Parameterized extends TomcatBaseT
parameterSets.add(new Object[] { useStrongEtag, task, null,
DatePrecondition.LT, null,
DatePrecondition.GT, null, Boolean.FALSE, SC_412 });
+ // RFC 9110, Section 13.2.2, Step 3, HEAD: If-None-Match with
and without If-Modified-Since
+ for (DatePrecondition dateCondition :
DatePrecondition.values()) {
+ parameterSets.add(new Object[] { useStrongEtag, task,
null, null, EtagPrecondition.ALL,
+ dateCondition, null, Boolean.FALSE, SC_304 });
+ parameterSets.add(new Object[] { useStrongEtag, task,
null, null, EtagPrecondition.EXACTLY,
+ dateCondition, null, Boolean.FALSE, SC_304 });
+ parameterSets.add(new Object[] { useStrongEtag, task,
null, null, EtagPrecondition.IN,
+ dateCondition, null, Boolean.FALSE, SC_304 });
+ parameterSets.add(new Object[] { useStrongEtag, task,
null, null, EtagPrecondition.NOT_IN,
+ dateCondition, null, Boolean.FALSE, SC_200 });
+ parameterSets.add(new Object[] { useStrongEtag, task,
null, null, EtagPrecondition.INVALID,
+ dateCondition, null, Boolean.FALSE, SC_400 });
+ parameterSets.add(new Object[] { useStrongEtag, task,
null, null,
+ EtagPrecondition.INVALID_ALL_PLUS_OTHER,
dateCondition, null, Boolean.FALSE, SC_400 });
+ }
+
// RFC 9110, Section 13.2.2, Step 4, HEAD: If-Unmodified-Since
only
parameterSets.add(new Object[] { useStrongEtag, task, null,
null, null, DatePrecondition.EQ, null,
Boolean.FALSE, SC_304 });
@@ -121,8 +137,8 @@ public class
TestDefaultServletRfc9110Section13Parameterized extends TomcatBaseT
Boolean.FALSE, SC_304 });
parameterSets.add(new Object[] { useStrongEtag, task, null,
null, null, DatePrecondition.MULTI_IN, null,
Boolean.FALSE, SC_200 });
- parameterSets.add(new Object[] { useStrongEtag, task, null,
null, null, DatePrecondition.MULTI_IN_REV, null,
- Boolean.FALSE, SC_200 });
+ parameterSets.add(new Object[] { useStrongEtag, task, null,
null, null, DatePrecondition.MULTI_IN_REV,
+ null, Boolean.FALSE, SC_200 });
parameterSets.add(new Object[] { useStrongEtag, task, null,
null, null, DatePrecondition.INVALID, null,
Boolean.FALSE, SC_200 });
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]