Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49998
authortimw <timw@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 3 Oct 2010 06:53:15 +0000 (06:53 +0000)
committertimw <timw@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 3 Oct 2010 06:53:15 +0000 (06:53 +0000)
Handle single quoted attributes in detection of jsp:root element in XML syntax JSP files.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1003923 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/ParserController.java
webapps/docs/changelog.xml

index d6e18e3..67f4797 100644 (file)
@@ -598,10 +598,12 @@ class ParserController implements TagConstants {
                     && Character.isWhitespace(root.charAt(index))) {
                 index++;
             }
-            if (index < root.length() && root.charAt(index++) == '"'
-                && root.regionMatches(index, JSP_URI, 0,
-                        JSP_URI.length())) {
-                return true;
+            if (index < root.length() 
+                && (root.charAt(index) == '"' || root.charAt(index) == '\'')) {
+                index++;
+                if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) {
+                    return true;
+                }
             }
         }
 
index ac6ab06..93a31a1 100644 (file)
         <bug>49860</bug>: Add support for trailing headers in chunked HTTP
         requests. (markt)
       </fix>
+      <fix>
+        <bug>49987</bug>: Make jsp:root detection work with single quoted
+        attributes as well. (timw)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">