You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/08/11 15:41:51 UTC

[tomcat] branch 10.0.x updated: Fix BZ66206

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
     new 4624aa4516 Fix BZ66206
4624aa4516 is described below

commit 4624aa451646c7152fc521f4716d8d44fe5ffc3c
Author: lihan <ao...@gmail.com>
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 620ff21134..5de7f9ac5e 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 jakarta.servlet.AsyncContext;
 import jakarta.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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org