tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r656024 - /tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
Date Tue, 13 May 2008 21:41:00 GMT
Author: markt
Date: Tue May 13 14:40:59 2008
New Revision: 656024

URL: http://svn.apache.org/viewvc?rev=656024&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44986
Convert to upper case before comparing encoding names

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=656024&r1=656023&r2=656024&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Tue May 13 14:40:59 2008
@@ -322,11 +322,12 @@
          * 
          * @throws JasperException in case of page encoding mismatch
          */
-        private String comparePageEncodings(String pageDirEnc,
+        private String comparePageEncodings(String thePageDirEnc,
                 Node.PageDirective pageDir) throws JasperException {
 
             Node.Root root = pageDir.getRoot();
-            String configEnc = root.getJspConfigPageEncoding();
+            String configEnc = root.getJspConfigPageEncoding().toUpperCase();
+            String pageDirEnc = thePageDirEnc.toUpperCase();
 
             /*
              * Compare the 'pageEncoding' attribute of the page directive with
@@ -354,7 +355,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


Mime
View raw message