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

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


The following commit(s) were added to refs/heads/main by this push:
     new 50f9fa394b Parameter names are not case-sensitive
50f9fa394b is described below

commit 50f9fa394bb23ed03c7a9c8b771eb29998c5e34f
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 1 16:12:34 2026 +0100

    Parameter names are not case-sensitive
---
 java/org/apache/jasper/compiler/Validator.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Validator.java 
b/java/org/apache/jasper/compiler/Validator.java
index 9936777009..f4466a8f40 100644
--- a/java/org/apache/jasper/compiler/Validator.java
+++ b/java/org/apache/jasper/compiler/Validator.java
@@ -1551,7 +1551,7 @@ class Validator {
         PageInfo pageInfo = compiler.getPageInfo();
         String contentType = pageInfo.getContentType();
 
-        if (contentType == null || !contentType.contains("charset=")) {
+        if (contentType == null || 
!contentType.toLowerCase(Locale.ENGLISH).contains("charset=")) {
             boolean isXml = page.getRoot().isXmlSyntax();
             String defaultType;
             defaultType = Objects.requireNonNullElse(contentType, isXml ? 
"text/xml" : "text/html");


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to