This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 47577ee75d Fix backports
47577ee75d is described below
commit 47577ee75d08b7ca2a6c74970268ff44026e8885
Author: remm <[email protected]>
AuthorDate: Thu Oct 15 23:00:05 2026 +0200
Fix backports
---
.../catalina/valves/TestParameterLimitValve.java | 4 ++++
.../apache/catalina/valves/TestRemoteIpValve.java | 1 +
.../tomcat/util/descriptor/web/TestWebXml.java | 4 ++--
.../digester/TestServiceBindingPropertySource.java | 24 +++++++++++-----------
4 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/test/org/apache/catalina/valves/TestParameterLimitValve.java
b/test/org/apache/catalina/valves/TestParameterLimitValve.java
index 21d62675cf..173dcc5d4d 100644
--- a/test/org/apache/catalina/valves/TestParameterLimitValve.java
+++ b/test/org/apache/catalina/valves/TestParameterLimitValve.java
@@ -632,6 +632,8 @@ public class TestParameterLimitValve extends TomcatBaseTest
{
ctx.addServletMapping("/special/endpoint", "snoop");
ctx.addServletMapping("/other/endpoint", "snoop");
+ addFailedRequestFilter(ctx);
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
@@ -669,6 +671,8 @@ public class TestParameterLimitValve extends TomcatBaseTest
{
Tomcat.addServlet(ctx, "snoop", new SnoopServlet());
ctx.addServletMapping("/special/endpoint", "snoop");
+ addFailedRequestFilter(ctx);
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
diff --git a/test/org/apache/catalina/valves/TestRemoteIpValve.java
b/test/org/apache/catalina/valves/TestRemoteIpValve.java
index 9a0b7a6b3f..43dc15def1 100644
--- a/test/org/apache/catalina/valves/TestRemoteIpValve.java
+++ b/test/org/apache/catalina/valves/TestRemoteIpValve.java
@@ -167,6 +167,7 @@ public class TestRemoteIpValve {
remoteIpValve.setNext(remoteAddrAndHostTrackerValve);
Request request = new MockRequest();
+ request.setCoyoteRequest(new org.apache.coyote.Request());
request.setRemoteAddr("192.168.0.10");
request.setRemoteHost("remote-host-original-value");
request.getCoyoteRequest().getMimeHeaders().addValue("x-forwarded-for").setString("
");
diff --git a/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
b/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
index 0c07d4d4c0..1629997209 100644
--- a/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
+++ b/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
@@ -819,8 +819,8 @@ public class TestWebXml {
"<web-app xmlns=\"https://jakarta.ee/xml/ns/jakartaee\"\n" +
"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
"
xsi:schemaLocation=\"https://jakarta.ee/xml/ns/jakartaee" +
- " https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd\"\n" +
- " version=\"6.1\"\n" +
+ " https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd\"\n" +
+ " version=\"6.0\"\n" +
" metadata-complete=\"true\">\n" +
"\n" +
" <service-ref>\n" +
diff --git
a/test/org/apache/tomcat/util/digester/TestServiceBindingPropertySource.java
b/test/org/apache/tomcat/util/digester/TestServiceBindingPropertySource.java
index 3a7e8d43fa..5af6f80725 100644
--- a/test/org/apache/tomcat/util/digester/TestServiceBindingPropertySource.java
+++ b/test/org/apache/tomcat/util/digester/TestServiceBindingPropertySource.java
@@ -49,8 +49,8 @@ public class TestServiceBindingPropertySource {
ServiceBindingPropertySource source =
new
ServiceBindingPropertySource(temporaryFolder.getRoot().getAbsolutePath());
- Assert.assertEquals(value,
source.getProperty("my-binding.keyPassword"));
- Assert.assertEquals(value,
source.getProperty("chomp:my-binding.withNewline"));
+ Assert.assertEquals(value,
source.getProperty("my-binding.keyPassword", null));
+ Assert.assertEquals(value,
source.getProperty("chomp:my-binding.withNewline", null));
}
@@ -66,12 +66,12 @@ public class TestServiceBindingPropertySource {
ServiceBindingPropertySource source =
new
ServiceBindingPropertySource(temporaryFolder.getRoot().getAbsolutePath());
- Assert.assertEquals("value",
source.getProperty("chomp:my-binding.lf"));
- Assert.assertEquals("value",
source.getProperty("chomp:my-binding.crlf"));
- Assert.assertEquals("value",
source.getProperty("chomp:my-binding.cr"));
- Assert.assertEquals("value",
source.getProperty("chomp:my-binding.none"));
- Assert.assertEquals("value\n",
source.getProperty("chomp:my-binding.blankline"));
- Assert.assertEquals("value ",
source.getProperty("chomp:my-binding.trailingspace"));
+ Assert.assertEquals("value", source.getProperty("chomp:my-binding.lf",
null));
+ Assert.assertEquals("value",
source.getProperty("chomp:my-binding.crlf", null));
+ Assert.assertEquals("value", source.getProperty("chomp:my-binding.cr",
null));
+ Assert.assertEquals("value",
source.getProperty("chomp:my-binding.none", null));
+ Assert.assertEquals("value\n",
source.getProperty("chomp:my-binding.blankline", null));
+ Assert.assertEquals("value ",
source.getProperty("chomp:my-binding.trailingspace", null));
}
@@ -82,10 +82,10 @@ public class TestServiceBindingPropertySource {
ServiceBindingPropertySource source =
new
ServiceBindingPropertySource(temporaryFolder.getRoot().getAbsolutePath());
- Assert.assertNull(source.getProperty("my-binding.unknown"));
- Assert.assertNull(source.getProperty("unknown-binding.known"));
+ Assert.assertNull(source.getProperty("my-binding.unknown", null));
+ Assert.assertNull(source.getProperty("unknown-binding.known", null));
// A key without exactly one dot is outside the <binding-name>.<key>
contract
- Assert.assertNull(source.getProperty("no-dot"));
- Assert.assertNull(source.getProperty("too.many.dots"));
+ Assert.assertNull(source.getProperty("no-dot", null));
+ Assert.assertNull(source.getProperty("too.many.dots", null));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]