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 3191b920d7 Fix BZ66206
3191b920d7 is described below
commit 3191b920d7159effbdb7d7f428fab7bef2687396
Author: lihan <[email protected]>
AuthorDate: Thu Aug 11 22:51:19 2022 +0800
Fix BZ66206
---
test/org/apache/catalina/valves/TestErrorReportValve.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java
b/test/org/apache/catalina/valves/TestErrorReportValve.java
index 0157f6f480..dc51de94fc 100644
--- a/test/org/apache/catalina/valves/TestErrorReportValve.java
+++ b/test/org/apache/catalina/valves/TestErrorReportValve.java
@@ -17,6 +17,10 @@
package org.apache.catalina.valves;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import javax.servlet.AsyncContext;
import javax.servlet.RequestDispatcher;
@@ -51,7 +55,12 @@ public class TestErrorReportValve extends TomcatBaseTest {
tomcat.start();
- ByteChunk res = getUrl("http://localhost:" + getPort());
+ ByteChunk res = new ByteChunk();
+ List<String> values = new ArrayList<>();
+ values.add("en");
+ Map<String, List<String>> reqHead = new HashMap<>();
+ reqHead.put("Accept-Language", values);
+ getUrl("http://localhost:" + getPort(), res, reqHead, null);
Assert.assertTrue(res.toString().contains("<p><b>Message</b> " +
ErrorServlet.ERROR_TEXT + "</p>"));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]