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 ae2d4b60c9 Add tests for invalid ETag
ae2d4b60c9 is described below
commit ae2d4b60c9f648e7554c24ab070766c3f80ccfff
Author: Mark Thomas <[email protected]>
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 10c2b1d4e4..d54987c1d9 100644
---
a/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
+++
b/test/org/apache/catalina/servlets/TestDefaultServletRfc9110Section13Parameterized.java
@@ -82,6 +82,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 });
@@ -170,6 +172,7 @@ public class
TestDefaultServletRfc9110Section13Parameterized extends TomcatBaseT
IN,
ALL,
NOT_IN,
+ INVALID,
INVALID_ALL_PLUS_OTHER
}
@@ -230,6 +233,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: [email protected]
For additional commands, e-mail: [email protected]