2014-06-11 2:46 GMT+04:00  <ma...@apache.org>:
> Author: markt
> Date: Tue Jun 10 22:46:55 2014
> New Revision: 1601787
>
> URL: http://svn.apache.org/r1601787
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56612
> Correctly parse two consecutive escaped single quotes when used in UEL
> expression in a JSP.
> Includes various unit tests that check the parsing of ${'\'\''}
>
> Added:
>     tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5nnnn/bug56612.jsp
>       - copied unchanged from r1601785, 
> tomcat/trunk/test/webapp/bug5nnnn/bug56612.jsp
> Modified:
>     tomcat/tc7.0.x/trunk/   (props changed)
>     tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
>     tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java
>     tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java
>     tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java
>     tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java
>     tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>
> Propchange: tomcat/tc7.0.x/trunk/
> ------------------------------------------------------------------------------
>   Merged /tomcat/trunk:r1601785
>
> Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1601787&r1=1601786&r2=1601787&view=diff
> ==============================================================================
> --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java 
> (original)
> +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java Tue Jun 
> 10 22:46:55 2014
> @@ -745,7 +745,7 @@ class Parser implements TagConstants {
>              // XXX could move this logic to JspReader
>              last = reader.mark(); // XXX somewhat wasteful

1. "last" is not advanced in this inner loop, nor it was inside the
old "if". It is likely a bug.
2. If think the "if"s below were supposed to be a chain of "elseif"s.
3. It needs backport to Tomcat 6.
4. A System.out.println has sneaked in below.

>              currentChar = reader.nextChar();
> -            if (currentChar == '\\' && (singleQuoted || doubleQuoted)) {
> +            while (currentChar == '\\' && (singleQuoted || doubleQuoted)) {
>                  // skip character following '\' within quotes
>                  reader.nextChar();
>                  currentChar = reader.nextChar();
>
> Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java?rev=1601787&r1=1601786&r2=1601787&view=diff
> ==============================================================================
> --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java 
> (original)
> +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java Tue 
> Jun 10 22:46:55 2014
> @@ -120,6 +120,7 @@ public class NioChannel implements ByteC
>       */
>      @Override
>      public int write(ByteBuffer src) throws IOException {
> +        System.out.println(Thread.currentThread().isInterrupted());
>          return sc.write(src);
>      }


(...)

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

Reply via email to