From: markt Date: Fri, 30 Jan 2009 05:30:23 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46564 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=21abcd6ff517da0d9f054c34317150b7740920d8;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46564 Encoding test should be case insensitive git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@739176 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Validator.java b/java/org/apache/jasper/compiler/Validator.java index c8168e510..fdc5a568d 100644 --- a/java/org/apache/jasper/compiler/Validator.java +++ b/java/org/apache/jasper/compiler/Validator.java @@ -374,16 +374,16 @@ class Validator { * Compares page encodings specified in various places, and throws * exception in case of page encoding mismatch. * - * @param pageDirEnc The value of the pageEncoding attribute of the page + * @param thePageDirEnc The value of the pageEncoding attribute of the page * directive @param pageDir The page directive node * * @throws JasperException in case of page encoding mismatch */ - private void compareTagEncodings(String pageDirEnc, + private void compareTagEncodings(String thePageDirEnc, Node.TagDirective pageDir) throws JasperException { Node.Root root = pageDir.getRoot(); - + String pageDirEnc = thePageDirEnc.toUpperCase(); /* * Compare the 'pageEncoding' attribute of the page directive with * the encoding specified in the XML prolog (only for XML syntax, @@ -392,7 +392,7 @@ class Validator { * identical. */ if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) || root.isBomPresent()) { - String pageEnc = root.getPageEncoding(); + String pageEnc = root.getPageEncoding().toUpperCase(); if (!pageDirEnc.equals(pageEnc) && (!pageDirEnc.startsWith("UTF-16") || !pageEnc .startsWith("UTF-16"))) {