This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new d6dd80d4ac Expand tests to cover If-None-Match
d6dd80d4ac is described below
commit d6dd80d4acee7a51d3a8a110ee0c68179e402545
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 eb14b5029c..9c9e99852e 100644
---
a/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
+++
b/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
@@ -97,8 +97,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 });
@@ -113,6 +113,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 });
@@ -122,8 +138,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]