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 2009/01/30 06:30:24 UTC

svn commit: r739176 - /tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

Author: markt
Date: Fri Jan 30 05:30:23 2009
New Revision: 739176

URL: http://svn.apache.org/viewvc?rev=739176&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46564
Encoding test should be case insensitive

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Validator.java?rev=739176&r1=739175&r2=739176&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Fri Jan 30 05:30:23 2009
@@ -374,16 +374,16 @@
          * 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 @@
              * 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"))) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org