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:42:27 UTC

[tomcat] branch 8.5.x updated: Fix BZ66206

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

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


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

commit d537cd55e62e4c0745284c21d4bda601ebb92860
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 da0a99fdd0..512008098c 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;
@@ -48,7 +52,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