[Bug 56607] shutdown.bat exits before shutdown

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56607

--- Comment #2 from elias.wul...@apptus.com ---
I would be happy to test a patch for you but I do not want you to toil with DOS
scripts if there is a better solution.

All I need is an official interface for doing this, not necessarily a DOS
script and not one depending on a Cygwin installation.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56611] New: No need to call method.isAnnotationPresent() then call method.getAnnotation.

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56611

Bug ID: 56611
   Summary: No need to call method.isAnnotationPresent() then call
method.getAnnotation.
   Product: Tomcat 7
   Version: 7.0.47
  Hardware: All
OS: Mac OS X 10.4
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: jian...@foxmail.com

Created attachment 31702
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31702&action=edit
org.apache.catalina.core.DefaultInstanceManager

Just call method.getAnnotation(EJB.class) once, since isAnnotationPresent is
also implmented by calling getAnnotation. 

java.lang.reflect.AccessibleObject:
public boolean isAnnotationPresent(
Class annotationClass) {
return getAnnotation(annotationClass) != null;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56611] No need to call method.isAnnotationPresent() then call method.getAnnotation.

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56611

Mou, Jian  changed:

   What|Removed |Added

  Attachment #31702|0   |1
   is patch||

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56518] NIO async servlet limit latch leak

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #12 from hanyong  ---
Created attachment 31703
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31703&action=edit
fix bug 56518 on TOMCAT_7_0_54

Clear thread interrupted status before write to NIO socket. i.e. Never
interrupt NIO ops.

It's very rough, but It's the simplest way and works.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1601583 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractEndpoint.java AprEndpoint.java JIoEndpoint.java Nio2Endpoint.java

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 09:37:39 2014
New Revision: 1601583

URL: http://svn.apache.org/r1601583
Log:
Pull up waitingRequests.
NIO2 used a ConcurrentHashMap whereas BIO and APR/native used a Queue. Switch 
to ConcurrentHashMap for all since what we really want here is a Set (and there 
isn't a ConcurrentHashSet implementation).

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1601583&r1=1601582&r2=1601583&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Tue Jun 
10 09:37:39 2014
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
 import java.util.concurrent.TimeUnit;
 
@@ -974,5 +975,7 @@ public abstract class AbstractEndpoint, SocketWrapper> 
waitingRequests =
+new ConcurrentHashMap<>();
 }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1601583&r1=1601582&r2=1601583&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Jun 10 
09:37:39 2014
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.tomcat.util.net;
 
 import java.util.ArrayList;
@@ -22,7 +21,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.Executor;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -95,9 +93,6 @@ public class AprEndpoint extends Abstrac
 protected long sslContext = 0;
 
 
-protected ConcurrentLinkedQueue> waitingRequests =
-new ConcurrentLinkedQueue<>();
-
 private final Map connections = new 
ConcurrentHashMap<>();
 
 //  Constructor
@@ -886,7 +881,7 @@ public class AprEndpoint extends Abstrac
 // result of calling AsyncContext.dispatch() from a non-container
 // thread
 synchronized (socket) {
-if (waitingRequests.remove(socket)) {
+if (waitingRequests.remove(socket) != null) {
 SocketProcessor proc = new SocketProcessor(socket, status);
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
@@ -1075,8 +1070,7 @@ public class AprEndpoint extends Abstrac
 // Ignore
 }
 long now = System.currentTimeMillis();
-Iterator> sockets =
-waitingRequests.iterator();
+Iterator> sockets = 
waitingRequests.keySet().iterator();
 while (sockets.hasNext()) {
 SocketWrapper socket = sockets.next();
 if (socket.isAsync()) {
@@ -2394,7 +2388,7 @@ public class AprEndpoint extends Abstrac
 } else if (state == Handler.SocketState.LONG) {
 socket.access();
 if (socket.isAsync()) {
-waitingRequests.add(socket);
+waitingRequests.put(socket, socket);
 }
 }
 }
@@ -2456,7 +2450,7 @@ public class AprEndpoint extends Abstrac
 } else if (state == Handler.SocketState.LONG) {
 socket.access();
 if (socket.isAsync()) {
-waitingRequests.add(socket);
+waitingRequests.put(socket, socket);
 }
 } else if (state == Handler.SocketState.ASYNC_END) {
 socket.access();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1601583&r1=1601582&r2=1601583&view=diff
==
--- tomcat/tr

svn commit: r1601590 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractEndpoint.java AprEndpoint.java JIoEndpoint.java Nio2Endpoint.java

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 09:52:56 2014
New Revision: 1601590

URL: http://svn.apache.org/r1601590
Log:
Pull up AsyncTimeout
APR/native used a separate flag to stop the thread. This avoided issues where 
running was set true->false-true in quick succession. This fix is now available 
to NIO2 and BIO as well.
Note NIO does not (currently) use the AsyncTimeout

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1601590&r1=1601589&r2=1601590&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Tue Jun 
10 09:52:56 2014
@@ -99,6 +99,60 @@ public abstract class AbstractEndpoint> sockets = 
waitingRequests.keySet().iterator();
+while (sockets.hasNext()) {
+SocketWrapper socket = sockets.next();
+if (socket.isAsync()) {
+long access = socket.getLastAccess();
+if (socket.getTimeout() > 0 &&
+(now-access) > socket.getTimeout()) {
+processSocket(socket, SocketStatus.TIMEOUT, true);
+}
+}
+}
+
+// Loop if endpoint is paused
+while (paused && asyncTimeoutRunning) {
+try {
+Thread.sleep(1000);
+} catch (InterruptedException e) {
+// Ignore
+}
+}
+
+}
+}
+
+
+protected void stop() {
+asyncTimeoutRunning = false;
+}
+}
+
+
 // - Fields
 
 
@@ -977,5 +1031,17 @@ public abstract class AbstractEndpoint, SocketWrapper> 
waitingRequests =
 new ConcurrentHashMap<>();
+
+
+/**
+ * The async timeout thread.
+ */
+private AsyncTimeout asyncTimeout = null;
+public AsyncTimeout getAsyncTimeout() {
+return asyncTimeout;
+}
+public void setAsyncTimeout(AsyncTimeout asyncTimeout) {
+this.asyncTimeout = asyncTimeout;
+}
 }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1601590&r1=1601589&r2=1601590&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Jun 10 
09:52:56 2014
@@ -18,7 +18,6 @@ package org.apache.tomcat.util.net;
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
@@ -191,15 +190,6 @@ public class AprEndpoint extends Abstrac
 
 
 /**
- * The socket poller.
- */
-protected AsyncTimeout asyncTimeout = null;
-public AsyncTimeout getAsyncTimeout() {
-return asyncTimeout;
-}
-
-
-/**
  * The static file sender.
  */
 protected Sendfile sendfile = null;
@@ -640,9 +630,8 @@ public class AprEndpoint extends Abstrac
 startAcceptorThreads();
 
 // Start async timeout thread
-asyncTimeout = new AsyncTimeout();
-Thread timeoutThread = new Thread(asyncTimeout,
-getName() + "-AsyncTimeout");
+setAsyncTimeout(new AsyncTimeout());
+Thread timeoutThread = new Thread(getAsyncTimeout(), getName() + 
"-AsyncTimeout");
 timeoutThread.setPriority(threadPriority);
 timeoutThread.setDaemon(true);
 timeoutThread.start();
@@ -662,7 +651,7 @@ public class AprEndpoint extends Abstrac
 if (running) {
 running = false;
 poller.stop();
-asyncTimeout.stop();
+getAsyncTimeout().stop();
 unlockAccept();
 for (AbstractEndpoint.Acceptor acceptor : acceptors) {
 long waitLeft = 1;
@@ -1048,59 +1037,6 @@ public class AprEndpoint extends Abstrac
 }
 
 
-/**
- * Async timeout thread
- */
-protected class AsyncTimeout implements Runnable {
-
-private volatile boolean asyncTimeoutRunning = true;
-
-/**
- * The background thread that checks async requests and 

[Bug 56610] jsp:param empty value error

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56610

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Mark Thomas  ---


*** This bug has been marked as a duplicate of bug 56561 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56561] NoSuchElementException on empty attribute in Validator$ValidateVisitor.getJspAttribute(Validator.java:1385)

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56561

Mark Thomas  changed:

   What|Removed |Added

 CC||raffaele.trip...@gmail.com

--- Comment #6 from Mark Thomas  ---
*** Bug 56610 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1601597 - in /tomcat/trunk: res/tomcat.nsi webapps/docs/changelog.xml webapps/docs/manager-howto.xml webapps/docs/realm-howto.xml

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 10:15:17 2014
New Revision: 1601597

URL: http://svn.apache.org/r1601597
Log:
Ensure that the new attribute name username is used in the tomcat-users.xml 
examples rather than the old name of user.

Modified:
tomcat/trunk/res/tomcat.nsi
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/manager-howto.xml
tomcat/trunk/webapps/docs/realm-howto.xml

Modified: tomcat/trunk/res/tomcat.nsi
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?rev=1601597&r1=1601596&r2=1601597&view=diff
==
--- tomcat/trunk/res/tomcat.nsi (original)
+++ tomcat/trunk/res/tomcat.nsi Tue Jun 10 10:15:17 2014
@@ -936,7 +936,7 @@ Function configure
 Push $TomcatAdminRoles
 Call xmlEscape
 Pop $R3
-StrCpy $R5 '$\r$\n'
+StrCpy $R5 '$\r$\n'
 DetailPrint 'Admin user added: "$TomcatAdminUsername"'
   ${EndIf}
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1601597&r1=1601596&r2=1601597&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jun 10 10:15:17 2014
@@ -224,6 +224,16 @@
   
 
   
+  
+
+  
+56606: Ensure that the new attribute name
+username is used in the tomcat-users.xml
+examples rather than the old attribute name of user.
+(markt)
+  
+
+  
   
 
   

Modified: tomcat/trunk/webapps/docs/manager-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/manager-howto.xml?rev=1601597&r1=1601596&r2=1601597&view=diff
==
--- tomcat/trunk/webapps/docs/manager-howto.xml (original)
+++ tomcat/trunk/webapps/docs/manager-howto.xml Tue Jun 10 10:15:17 2014
@@ -173,7 +173,7 @@ Exactly how the usernames/passwords are 
 edited with any text editor.  This file contains an XML
  for each individual user, which might
 look something like this:
-
+
 which defines the username and password used by this individual to
 log on, and the role names he or she is associated with.  You can
 add the manager-script role to the comma-delimited

Modified: tomcat/trunk/webapps/docs/realm-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/realm-howto.xml?rev=1601597&r1=1601596&r2=1601597&view=diff
==
--- tomcat/trunk/webapps/docs/realm-howto.xml (original)
+++ tomcat/trunk/webapps/docs/realm-howto.xml Tue Jun 10 10:15:17 2014
@@ -891,9 +891,9 @@ nested inside the conf/tomcat-users.xml file is:
 
 
 Additional Notes



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



svn commit: r1601598 - in /tomcat/tc7.0.x/trunk: res/tomcat.nsi webapps/docs/changelog.xml webapps/docs/manager-howto.xml

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 10:16:01 2014
New Revision: 1601598

URL: http://svn.apache.org/r1601598
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56606
Ensure that the new attribute name username is used in the tomcat-users.xml 
examples rather than the old name of user.

Modified:
tomcat/tc7.0.x/trunk/res/tomcat.nsi
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/manager-howto.xml

Modified: tomcat/tc7.0.x/trunk/res/tomcat.nsi
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/tomcat.nsi?rev=1601598&r1=1601597&r2=1601598&view=diff
==
--- tomcat/tc7.0.x/trunk/res/tomcat.nsi (original)
+++ tomcat/tc7.0.x/trunk/res/tomcat.nsi Tue Jun 10 10:16:01 2014
@@ -936,7 +936,7 @@ Function configure
 Push $TomcatAdminRoles
 Call xmlEscape
 Pop $R3
-StrCpy $R5 '$\r$\n'
+StrCpy $R5 '$\r$\n'
 DetailPrint 'Admin user added: "$TomcatAdminUsername"'
   ${EndIf}
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1601598&r1=1601597&r2=1601598&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Jun 10 10:16:01 2014
@@ -122,6 +122,16 @@
   
 
   
+  
+
+  
+56606: Ensure that the new attribute name
+username is used in the tomcat-users.xml
+examples rather than the old attribute name of user.
+(markt)
+  
+
+  
 
 
   

Modified: tomcat/tc7.0.x/trunk/webapps/docs/manager-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/manager-howto.xml?rev=1601598&r1=1601597&r2=1601598&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/manager-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/manager-howto.xml Tue Jun 10 10:16:01 2014
@@ -173,7 +173,7 @@ Exactly how the usernames/passwords are 
 edited with any text editor.  This file contains an XML
  for each individual user, which might
 look something like this:
-
+
 which defines the username and password used by this individual to
 log on, and the role names he or she is associated with.  You can
 add the manager-script role to the comma-delimited



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



svn commit: r1601599 - /tomcat/tc6.0.x/trunk/STATUS.txt

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 10:18:51 2014
New Revision: 1601599

URL: http://svn.apache.org/r1601599
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1601599&r1=1601598&r2=1601599&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun 10 10:18:51 2014
@@ -51,6 +51,12 @@ PATCHES PROPOSED TO BACKPORT:
   +1: markt, kkolinko, schultz
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56606
+  User new attribute name for username
+  http://people.apache.org/~markt/patches/2014-06-10-user-username-tc6-v1.patch
+  +1: markt
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED:
 



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



[Bug 56606] Tomcat Installer: old attribute generated in tomcat-users.xml instead of the new one

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56606

Mark Thomas  changed:

   What|Removed |Added

  Component|Packaging   |Native:Packaging
Version|trunk   |6.0.41
Product|Tomcat 7|Tomcat 6
   Target Milestone|--- |default
 OS||All

--- Comment #1 from Mark Thomas  ---
Fixed in 8.0.x for 8.0.9 and 7.0.x for 7.0.55.

Proposed for 6.0.x

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56612] New: Jasper is not able to parse two consecutive escaped single quotes in EL

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56612

Bug ID: 56612
   Summary: Jasper is not able to parse two consecutive escaped
single quotes in EL
   Product: Tomcat 8
   Version: 8.0.5
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: pavel.ho...@orchitech.cz

JSP compiler breaks when it encounters two consecutive escaped single quotes in
EL.

Example JSP:

${'\'\''}

Expected result:

''

Result:

org.apache.jasper.JasperException: /test.jsp (line: 1, column: 3)
Unterminated ${ tag
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
   
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:276)
   
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:92)
org.apache.jasper.compiler.Parser.parseELExpression(Parser.java:760)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1473)
org.apache.jasper.compiler.Parser.parse(Parser.java:139)
   
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:229)
   
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:342)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Bug is also present in Tomcat 7.0.53.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56612] Jasper is not able to parse two consecutive escaped single quotes in EL

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56612

Pavel Horal  changed:

   What|Removed |Added

 CC||pavel.ho...@orchitech.cz

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56518] NIO async servlet limit latch leak

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #13 from Mark Thomas  ---
Thanks for all your work on this. It is much appreciated.

Given that it is the application that is triggering the interrupt, shouldn't it
be the application's responsibility to clear that interrupt before continuing
and flushing the response buffer?

I'm currently thinking of adding a test for the current Thread being
interrupted to the NIO write methods along the lines of your proposed patch. I
want to test the performance of this first. I'm also leaning towards logging a
warning if the thread is interrupted on the basis that the app that generated
the interrupt should have cleared it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: svn commit: r1601590 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractEndpoint.java AprEndpoint.java JIoEndpoint.java Nio2Endpoint.java

2014-06-10 Thread Mark Thomas
On 10/06/2014 10:52, ma...@apache.org wrote:
> Author: markt
> Date: Tue Jun 10 09:52:56 2014
> New Revision: 1601590
> 
> URL: http://svn.apache.org/r1601590
> Log:
> Pull up AsyncTimeout
> APR/native used a separate flag to stop the thread. This avoided issues where 
> running was set true->false-true in quick succession. This fix is now 
> available to NIO2 and BIO as well.
> Note NIO does not (currently) use the AsyncTimeout

The Async unit test is currently taking 15 mins per test. I'm guessing
that I broke something in the async timeouts with this refactoring. I'm
looking now.

Mark

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



"Printable" documentation for tomcat-connectors

2014-06-10 Thread Christopher Schultz
All,

I noticed a series of typos on the connectors docs and I was going to
fix them. Before noticing that, as usual, .xml -> .html, I saw that
there are two copies of many parts of the site: "regular" and "printer".
For example:

./tomcat-site/docs/connectors-doc/generic_howto/printer/workers.html
./tomcat-site/docs/connectors-doc/generic_howto/workers.html
./tomcat-site/docs/connectors-doc/reference/printer/workers.html
./tomcat-site/docs/connectors-doc/reference/workers.html

I checked, and the only difference appears to be that the "regular"
pages have a link to the "printable" pages, their links (due to nested
directories) all have an additional ".." in them, and of course the
"left navigation bar" is missing.

Is there a reason not to do this with CSS where the @media=print just
hides the left bar? I think we'd have a slightly simpler docs/build,
fewer pages and links, etc.

Any objections to me removing those extra pages and using CSS instead?

We'd want to set up permanent redirects from the printer/* URLs to their
replacements, and I don't know how to do that from the docs themselves
unless we actually code META REFRESH which seems silly when the web
server can handle that for us. I'd need a bit of help from the infra
team for that, I think.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


Time for tcnative-1.1.31?

2014-06-10 Thread Christopher Schultz
All,

OpenSSL was released last week with a bunch of patches for fun
vulnerabilities. We should probably roll a new release that includes it.

I would offer to do it myself, but I don't have a win32 build
environment, nor are there instructions for building on win32. I believe
Mladen posted them a while back, but I can't seem to find those
instructions in the archives.

I could probably get an environment set up, but I'd still need the
instructions. I can see that the ant build file has lots of
win32-specific stuff in it, so perhaps the key is there. The
instructions in BUILDING.txt don't say a thing about using ant, though.

Any suggestions?

-chris



signature.asc
Description: OpenPGP digital signature


async error message if not supported

2014-06-10 Thread Romain Manni-Bucau
Hi

in /org/apache/catalina/connector/Request.java it would be nice if error
message if there is a filter/servlet not supporting async would be more
explicit. Here is the code:

1654 @Override
1655 public AsyncContext startAsync(ServletRequest request,
1656 ServletResponse response) {
1657 if (!isAsyncSupported()) {
1658 throw new IllegalStateException("Not supported.");
1659 }

I propose to change it to:

throw new IllegalStateException("A filter or servlet of the current chain
doesn't support asynchronism.");

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


svn commit: r1601761 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 20:01:05 2014
New Revision: 1601761

URL: http://svn.apache.org/r1601761
Log:
Fix failures to timeout async requests after refactoring. The removed condition 
was added to the APR connector (by me) some time ago but reviewing the current 
code I can see no reason for it to stay.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1601761&r1=1601760&r2=1601761&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Tue Jun 
10 20:01:05 2014
@@ -125,12 +125,9 @@ public abstract class AbstractEndpoint> sockets = 
waitingRequests.keySet().iterator();
 while (sockets.hasNext()) {
 SocketWrapper socket = sockets.next();
-if (socket.isAsync()) {
-long access = socket.getLastAccess();
-if (socket.getTimeout() > 0 &&
-(now-access) > socket.getTimeout()) {
-processSocket(socket, SocketStatus.TIMEOUT, true);
-}
+long access = socket.getLastAccess();
+if (socket.getTimeout() > 0 && (now - access) > 
socket.getTimeout()) {
+processSocket(socket, SocketStatus.TIMEOUT, true);
 }
 }
 



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



Re: svn commit: r1601590 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractEndpoint.java AprEndpoint.java JIoEndpoint.java Nio2Endpoint.java

2014-06-10 Thread Konstantin Kolinko
2014-06-10 18:06 GMT+04:00 Mark Thomas :
> On 10/06/2014 10:52, ma...@apache.org wrote:
>> Author: markt
>> Date: Tue Jun 10 09:52:56 2014
>> New Revision: 1601590
>>
>> URL: http://svn.apache.org/r1601590
>> Log:
>> Pull up AsyncTimeout
>> APR/native used a separate flag to stop the thread. This avoided issues 
>> where running was set true->false-true in quick succession. This fix is now 
>> available to NIO2 and BIO as well.
>> Note NIO does not (currently) use the AsyncTimeout
>
> The Async unit test is currently taking 15 mins per test. I'm guessing
> that I broke something in the async timeouts with this refactoring. I'm
> looking now.

http://svn.apache.org/r1601443
is suspicious for me.
Was there a reason to add "if (socket.isAsync())" around timeout processing?

The subsequent Gump run this morning aborted the BIO test for running
longer than 60min.
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-bio/index.html
(I looked at catalina.log file of that run and there were intervals
>10 minutes between some starts and stops, but I do not know which
tests are those).

E.g. two subsequent lines:

10-Jun-2014 15:23:29.562 INFO [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
["http-bio-127.0.0.1-auto-17-38746"]
10-Jun-2014 15:40:14.677 INFO [main]
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["http-bio-127.0.0.1-auto-17-38746"]



Best regards,
Konstantin Kolinko

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



Re: Time for tcnative-1.1.31?

2014-06-10 Thread Konstantin Kolinko
2014-06-10 18:46 GMT+04:00 Christopher Schultz :
> All,
>
> OpenSSL was released last week with a bunch of patches for fun
> vulnerabilities. We should probably roll a new release that includes it.
>
> I would offer to do it myself, but I don't have a win32 build
> environment, nor are there instructions for building on win32. I believe
> Mladen posted them a while back, but I can't seem to find those
> instructions in the archives.
>
> I could probably get an environment set up, but I'd still need the
> instructions. I can see that the ant build file has lots of
> win32-specific stuff in it, so perhaps the key is there. The
> instructions in BUILDING.txt don't say a thing about using ant, though.
>
> Any suggestions?

See here:
https://issues.apache.org/bugzilla/show_bug.cgi?id=55114
https://issues.apache.org/bugzilla/show_bug.cgi?id=56363#c10

Best regards,
Konstantin Kolinko

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



Re: "Printable" documentation for tomcat-connectors

2014-06-10 Thread Konstantin Kolinko
2014-06-10 18:25 GMT+04:00 Christopher Schultz :
> All,
>
> I noticed a series of typos on the connectors docs and I was going to
> fix them. Before noticing that, as usual, .xml -> .html, I saw that
> there are two copies of many parts of the site: "regular" and "printer".
> For example:
>
> ./tomcat-site/docs/connectors-doc/generic_howto/printer/workers.html
> ./tomcat-site/docs/connectors-doc/generic_howto/workers.html
> ./tomcat-site/docs/connectors-doc/reference/printer/workers.html
> ./tomcat-site/docs/connectors-doc/reference/workers.html
>
> I checked, and the only difference appears to be that the "regular"
> pages have a link to the "printable" pages, their links (due to nested
> directories) all have an additional ".." in them, and of course the
> "left navigation bar" is missing.
>
> Is there a reason not to do this with CSS where the @media=print just
> hides the left bar? I think we'd have a slightly simpler docs/build,
> fewer pages and links, etc.
>
> Any objections to me removing those extra pages and using CSS instead?

Just a legacy. See
https://svn.apache.org/r601180
https://svn.apache.org/r717913
https://svn.apache.org/r941413

Connectors are released rather rarely, so just nobody worked on that.

A caveat may be that you have to update build.xml as well and make
sure that a src buindles build successfully.  Both
tomcat-connectors-1.2.40-src.zip and
tomcat-connectors-1.2.40-src.tar.gz contain "docs" directory with
generated documentation in them.

The binary bundles do not have documentation in them, just README,
LICENSE, NOTICE and a binary (e.g. mod_jk.so). So those are not
affected.

> We'd want to set up permanent redirects from the printer/* URLs to their
> replacements, and I don't know how to do that from the docs themselves
> unless we actually code META REFRESH which seems silly when the web
> server can handle that for us. I'd need a bit of help from the infra
> team for that, I think.

Redirection can be done with a ".htaccess" file, like here:
https://svn.apache.org/viewvc/tomcat/site/trunk/docs/faq/

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1601590 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AbstractEndpoint.java AprEndpoint.java JIoEndpoint.java Nio2Endpoint.java

2014-06-10 Thread Mark Thomas
On 10/06/2014 21:01, Konstantin Kolinko wrote:
> 2014-06-10 18:06 GMT+04:00 Mark Thomas :
>> On 10/06/2014 10:52, ma...@apache.org wrote:
>>> Author: markt
>>> Date: Tue Jun 10 09:52:56 2014
>>> New Revision: 1601590
>>>
>>> URL: http://svn.apache.org/r1601590
>>> Log:
>>> Pull up AsyncTimeout
>>> APR/native used a separate flag to stop the thread. This avoided issues 
>>> where running was set true->false-true in quick succession. This fix is now 
>>> available to NIO2 and BIO as well.
>>> Note NIO does not (currently) use the AsyncTimeout
>>
>> The Async unit test is currently taking 15 mins per test. I'm guessing
>> that I broke something in the async timeouts with this refactoring. I'm
>> looking now.
> 
> http://svn.apache.org/r1601443
> is suspicious for me.
> Was there a reason to add "if (socket.isAsync())" around timeout processing?

Agreed. That was where I looked first too. I added it as APR had it when
I was aligning the code prior to the refactoring. On further review, I
opted to remove it.

Mark

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



Re: "Printable" documentation for tomcat-connectors

2014-06-10 Thread Christopher Schultz
Konstantin,

On 6/10/14, 4:46 PM, Konstantin Kolinko wrote:
> 2014-06-10 18:25 GMT+04:00 Christopher Schultz :
>> All,
>>
>> I noticed a series of typos on the connectors docs and I was going to
>> fix them. Before noticing that, as usual, .xml -> .html, I saw that
>> there are two copies of many parts of the site: "regular" and "printer".
>> For example:
>>
>> ./tomcat-site/docs/connectors-doc/generic_howto/printer/workers.html
>> ./tomcat-site/docs/connectors-doc/generic_howto/workers.html
>> ./tomcat-site/docs/connectors-doc/reference/printer/workers.html
>> ./tomcat-site/docs/connectors-doc/reference/workers.html
>>
>> I checked, and the only difference appears to be that the "regular"
>> pages have a link to the "printable" pages, their links (due to nested
>> directories) all have an additional ".." in them, and of course the
>> "left navigation bar" is missing.
>>
>> Is there a reason not to do this with CSS where the @media=print just
>> hides the left bar? I think we'd have a slightly simpler docs/build,
>> fewer pages and links, etc.
>>
>> Any objections to me removing those extra pages and using CSS instead?
> 
> Just a legacy. See
> https://svn.apache.org/r601180
> https://svn.apache.org/r717913
> https://svn.apache.org/r941413
> 
> Connectors are released rather rarely, so just nobody worked on that.

Thanks for the references. I'll likely make similar changes to the
connectors project, then.

> A caveat may be that you have to update build.xml as well and make
> sure that a src buindles build successfully.  Both
> tomcat-connectors-1.2.40-src.zip and
> tomcat-connectors-1.2.40-src.tar.gz contain "docs" directory with
> generated documentation in them.

Gotcha. I'm okay with the generated documentation lacking those
printer/.html files. I'm more worried about potential external links out
there in the world stuffed into documentation, etc.

> The binary bundles do not have documentation in them, just README,
> LICENSE, NOTICE and a binary (e.g. mod_jk.so). So those are not
> affected.
> 
>> We'd want to set up permanent redirects from the printer/* URLs to their
>> replacements, and I don't know how to do that from the docs themselves
>> unless we actually code META REFRESH which seems silly when the web
>> server can handle that for us. I'd need a bit of help from the infra
>> team for that, I think.
> 
> Redirection can be done with a ".htaccess" file, like here:
> https://svn.apache.org/viewvc/tomcat/site/trunk/docs/faq/

Aah, okay. I didn't realize that .htaccess files were okay to use. They
seem like a huge security hole ;)

-chris



signature.asc
Description: OpenPGP digital signature


Re: Time for tcnative-1.1.31?

2014-06-10 Thread Christopher Schultz
Konstantin,

On 6/10/14, 4:09 PM, Konstantin Kolinko wrote:
> 2014-06-10 18:46 GMT+04:00 Christopher Schultz :
>> All,
>>
>> OpenSSL was released last week with a bunch of patches for fun
>> vulnerabilities. We should probably roll a new release that includes it.
>>
>> I would offer to do it myself, but I don't have a win32 build
>> environment, nor are there instructions for building on win32. I believe
>> Mladen posted them a while back, but I can't seem to find those
>> instructions in the archives.
>>
>> I could probably get an environment set up, but I'd still need the
>> instructions. I can see that the ant build file has lots of
>> win32-specific stuff in it, so perhaps the key is there. The
>> instructions in BUILDING.txt don't say a thing about using ant, though.
>>
>> Any suggestions?
> 
> See here:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=55114
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56363#c10

Aah, right: it was Bugzilla. Hard to search archive subjects and authors
when neither the subject nor the author contain the search strings I was
trying.

I'm trying to fetch Visual Studio Express but I'm in circular-link hell
at http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs

Maybe I have to register to advance. :(

-chris



signature.asc
Description: OpenPGP digital signature


Re: "Printable" documentation for tomcat-connectors

2014-06-10 Thread Mark Thomas
On 10/06/2014 22:59, Christopher Schultz wrote:

> Aah, okay. I didn't realize that .htaccess files were okay to use.
> They seem like a huge security hole ;)

Infra limits what you can do in a .htaccess file and - by default - we
trust committers. That said, infra won't hesitate to lock an account
of a user that does something malicious (or just plain stupid). The
chances of a committer regaining access to a locked account are higher
if they have just been stupid but it is still by no means guaranteed.

Mark


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



svn commit: r1601785 - in /tomcat/trunk: java/org/apache/jasper/compiler/ test/org/apache/el/ test/org/apache/jasper/compiler/ test/webapp/bug5nnnn/ webapps/docs/

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 22:39:22 2014
New Revision: 1601785

URL: http://svn.apache.org/r1601785
Log:
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/trunk/test/webapp/bug5/bug56612.jsp   (with props)
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/trunk/test/org/apache/el/TestELEvaluation.java
tomcat/trunk/test/org/apache/el/TestELInJsp.java
tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1601785&r1=1601784&r2=1601785&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Tue Jun 10 
22:39:22 2014
@@ -751,7 +751,7 @@ class Parser implements TagConstants {
 // XXX could move this logic to JspReader
 last = reader.mark(); // XXX somewhat wasteful
 currentChar = reader.nextChar();
-if (currentChar == '\\' && (singleQuoted || doubleQuoted)) {
+while (currentChar == '\\' && (singleQuoted || doubleQuoted)) {
 // skip character following '\' within quotes
 reader.nextChar();
 currentChar = reader.nextChar();

Modified: tomcat/trunk/test/org/apache/el/TestELEvaluation.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELEvaluation.java?rev=1601785&r1=1601784&r2=1601785&view=diff
==
--- tomcat/trunk/test/org/apache/el/TestELEvaluation.java (original)
+++ tomcat/trunk/test/org/apache/el/TestELEvaluation.java Tue Jun 10 22:39:22 
2014
@@ -164,6 +164,11 @@ public class TestELEvaluation {
 assertEquals("\"\\", evaluateExpression("${\"\\\"\"}"));
 }
 
+@Test
+public void testMultipleEscaping() throws Exception {
+assertEquals("''", evaluateExpression("${\"\'\'\"}"));
+}
+
 private void compareBoth(String msg, int expected, Object o1, Object o2){
 int i1 = ELSupport.compare(o1, o2);
 int i2 = ELSupport.compare(o2, o1);

Modified: tomcat/trunk/test/org/apache/el/TestELInJsp.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELInJsp.java?rev=1601785&r1=1601784&r2=1601785&view=diff
==
--- tomcat/trunk/test/org/apache/el/TestELInJsp.java (original)
+++ tomcat/trunk/test/org/apache/el/TestELInJsp.java Tue Jun 10 22:39:22 2014
@@ -502,6 +502,26 @@ public class TestELInJsp extends TomcatB
 }
 
 
+@Test
+public void testBug56612() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp");
+// app dir is relative to server home
+Context ctx = tomcat.addWebapp(null, "/test", 
appDir.getAbsolutePath());
+
+ctx.setResources(new StandardRoot(ctx));
+
+tomcat.start();
+
+ByteChunk res = getUrl("http://localhost:"; + getPort() +
+"/test/bug5/bug56612.jsp");
+
+String result = res.toString();
+Assert.assertTrue(result.contains("00-''"));
+}
+
+
 // Assertion for text contained with , e.g. printed by tags:echo
 private static void assertEcho(String result, String expected) {
 assertTrue(result, result.indexOf("" + expected + "") > 0);

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java?rev=1601785&r1=1601784&r2=1601785&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java Tue Jun 10 
22:39:22 2014
@@ -266,6 +266,13 @@ public class TestELParser {
 }
 
 
+@Test
+public void testEscape11() throws JasperException {
+// Bug 56612
+doTestParser("${'\\'\\''}", "''");
+}
+
+
 private void doTestParser(String input, String expected) throws 
JasperException {
 ELException elException = null;
 String elResult = null;

Added: tomcat/trunk/test/webapp/bug5/bug56612.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/bug5/bug56612.jsp?rev=1601785&view=auto
==
--- tomcat/trunk/test/webapp/bug5/bug56612.jsp (added)
+++ tomcat/trunk/test/webapp/bug5/bug56612.jsp Tue Jun 10 22:39:22 2014
@@ -0,0 +1,17 @@
+<%--
+ Licensed to the

svn commit: r1601787 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ java/org/apache/tomcat/util/net/ test/org/apache/el/ test/org/apache/jasper/compiler/ test/webapp-3.0/bug5nnnn/ web

2014-06-10 Thread markt
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/bug5/bug56612.jsp
  - copied unchanged from r1601785, 
tomcat/trunk/test/webapp/bug5/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
 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);
 }
 

Modified: tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java?rev=1601787&r1=1601786&r2=1601787&view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java Tue Jun 10 
22:46:55 2014
@@ -164,6 +164,11 @@ public class TestELEvaluation {
 assertEquals("\"\\", evaluateExpression("${\"\\\"\"}"));
 }
 
+@Test
+public void testMultipleEscaping() throws Exception {
+assertEquals("''", evaluateExpression("${\"\'\'\"}"));
+}
+
 private void compareBoth(String msg, int expected, Object o1, Object o2){
 int i1 = ELSupport.compare(o1, o2);
 int i2 = ELSupport.compare(o2, o1);

Modified: tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java?rev=1601787&r1=1601786&r2=1601787&view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java Tue Jun 10 
22:46:55 2014
@@ -488,6 +488,24 @@ public class TestELInJsp extends TomcatB
 }
 
 
+@Test
+public void testBug56612() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp-3.0");
+// app dir is relative to server home
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+ByteChunk res = getUrl("http://localhost:"; + getPort() +
+"/test/bug5/bug56612.jsp");
+
+String result = res.toString();
+Assert.assertTrue(result.contains("00-''"));
+}
+
+
 // Assertion for text contained with , e.g. printed by tags:echo
 private static void assertEcho(String result, String expected) {
 assertTrue(result, result.indexOf("" + expected + "") > 0);

Modified: tomcat/t

[Bug 56612] Jasper is not able to parse two consecutive escaped single quotes in EL

2014-06-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56612

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Thanks for the report. This has been fixed in 8.0.x for 8.0.9 and in 7.0.x for
7.0.55 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: svn commit: r1601787 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ java/org/apache/tomcat/util/net/ test/org/apache/el/ test/org/apache/jasper/compiler/ test/webapp-3.0/bug5nnnn/

2014-06-10 Thread Konstantin Kolinko
2014-06-11 2:46 GMT+04:00  :
> 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/bug5/bug56612.jsp
>   - copied unchanged from r1601785, 
> tomcat/trunk/test/webapp/bug5/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



svn commit: r1601788 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 22:57:52 2014
New Revision: 1601788

URL: http://svn.apache.org/r1601788
Log:
Revert accidental commit.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java

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=1601788&r1=1601787&r2=1601788&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:57:52 2014
@@ -120,7 +120,6 @@ 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



RE: Time for tcnative-1.1.31?

2014-06-10 Thread Konstantin Preißer
Hi Christopher,

> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Wednesday, June 11, 2014 12:11 AM

> I'm trying to fetch Visual Studio Express but I'm in circular-link hell
> at http://www.visualstudio.com/en-us/downloads/download-visual-studio-
> vs
> 
> Maybe I have to register to advance. :(

Those Microsoft sites require you to register before you can download it.

However, you can also download "Visual Studio Express 2013 for Windows Desktop" 
from MS Download Center without registration:
http://www.microsoft.com/de-de/download/details.aspx?id=40787


Regards,
Konstantin Preißer


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



Re: svn commit: r1601787 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ java/org/apache/tomcat/util/net/ test/org/apache/el/ test/org/apache/jasper/compiler/ test/webapp-3.0/bug5nnnn/

2014-06-10 Thread Mark Thomas
On 10/06/2014 23:55, Konstantin Kolinko wrote:
> 2014-06-11 2:46 GMT+04:00  :
>> 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/bug5/bug56612.jsp
>>   - copied unchanged from r1601785, 
>> tomcat/trunk/test/webapp/bug5/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.

I don't see how. It should be correct at the point it is used.

> 2. If think the "if"s below were supposed to be a chain of "elseif"s.

Looks like a clean-up that was never back-ported from 8 to 7. If you
want to scratch that itch, go ahead.

> 3. It needs backport to Tomcat 6.

I'll propose the backport shortly.

> 4. A System.out.println has sneaked in below.

That was me debugging BZ 56518 - fixed.

> 
>>  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
> 


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



svn commit: r1601790 - /tomcat/tc6.0.x/trunk/STATUS.txt

2014-06-10 Thread markt
Author: markt
Date: Tue Jun 10 23:23:59 2014
New Revision: 1601790

URL: http://svn.apache.org/r1601790
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1601790&r1=1601789&r2=1601790&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun 10 23:23:59 2014
@@ -57,6 +57,12 @@ PATCHES PROPOSED TO BACKPORT:
   +1: markt
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56612
+  Correct parse {'\'\''} in JSPs
+  http://people.apache.org/~markt/patches/2014-06-11-bug56612-tc6-v1.patch
+  +1: markt
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED:
 



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



Re: svn commit: r1601787 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ java/org/apache/tomcat/util/net/ test/org/apache/el/ test/org/apache/jasper/compiler/ test/webapp-3.0/bug5nnnn/

2014-06-10 Thread Konstantin Kolinko
2014-06-11 3:18 GMT+04:00 Mark Thomas :
> On 10/06/2014 23:55, Konstantin Kolinko wrote:
>> 2014-06-11 2:46 GMT+04:00  :
>>> 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/bug5/bug56612.jsp
>>>   - copied unchanged from r1601785, 
>>> tomcat/trunk/test/webapp/bug5/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.
>
> I don't see how. It should be correct at the point it is used.
>

Ack. I see.
(For the record:
Those additional "reader.nextChar()" calls are performed only when
inside single or double quotes. To break the outer loop one has to
read a quote and to read a '}' character. The latter will update the
"last" pointer.
)

>> 2. If think the "if"s below were supposed to be a chain of "elseif"s.
>
> Looks like a clean-up that was never back-ported from 8 to 7. If you
> want to scratch that itch, go ahead.

Understood. I was looking at 6.0.x code at that moment.

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



svn commit: r1601796 - in /tomcat/trunk: java/org/apache/catalina/connector/Request.java webapps/docs/changelog.xml

2014-06-10 Thread violetagg
Author: violetagg
Date: Wed Jun 11 01:49:21 2014
New Revision: 1601796

URL: http://svn.apache.org/r1601796
Log:
Provide a better error message when asynchronous operations are not supported 
by a filter or servlet. Patch provided by Romain Manni-Bucau. Issue was 
reported via users at tomcat.a.o.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1601796&r1=1601795&r2=1601796&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Wed Jun 11 
01:49:21 2014
@@ -1601,7 +1601,8 @@ public class Request
 public AsyncContext startAsync(ServletRequest request,
 ServletResponse response) {
 if (!isAsyncSupported()) {
-throw new IllegalStateException("Not supported.");
+throw new IllegalStateException(
+"A filter or servlet of the current chain does not support 
asynchronous operations.");
 }
 
 if (asyncContext == null) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1601796&r1=1601795&r2=1601796&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jun 11 01:49:21 2014
@@ -130,6 +130,11 @@
 56600: In WebdavServlet: Do not waste time generating
 response for broken PROPFIND request. (kkolinko)
   
+  
+Provide a better error message when asynchronous operations are not
+supported by a filter or servlet. Patch provided by Romain Manni-Bucau.
+(violetagg)
+  
 
   
   



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



svn propchange: r1601796 - svn:log

2014-06-10 Thread violetagg
Author: violetagg
Revision: 1601796
Modified property: svn:log

Modified: svn:log at Wed Jun 11 01:51:39 2014
--
--- svn:log (original)
+++ svn:log Wed Jun 11 01:51:39 2014
@@ -1 +1 @@
-Provide a better error message when asynchronous operations are not supported 
by a filter or servlet. Patch provided by Romain Manni-Bucau. Issue was 
reported via users at tomcat.a.o.
+Provide a better error message when asynchronous operations are not supported 
by a filter or servlet. Patch provided by Romain Manni-Bucau. Issue was 
reported via dev at tomcat.a.o.


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



svn commit: r1601797 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/Request.java webapps/docs/changelog.xml

2014-06-10 Thread violetagg
Author: violetagg
Date: Wed Jun 11 01:55:59 2014
New Revision: 1601797

URL: http://svn.apache.org/r1601797
Log:
Merged revision 1601796 from tomcat/trunk:
Provide a better error message when asynchronous operations are not supported 
by a filter or servlet. Patch provided by Romain Manni-Bucau. Issue was 
reported via dev at tomcat.a.o.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1601796

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=1601797&r1=1601796&r2=1601797&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java Wed 
Jun 11 01:55:59 2014
@@ -1655,7 +1655,8 @@ public class Request
 public AsyncContext startAsync(ServletRequest request,
 ServletResponse response) {
 if (!isAsyncSupported()) {
-throw new IllegalStateException("Not supported.");
+throw new IllegalStateException(
+"A filter or servlet of the current chain does not support 
asynchronous operations.");
 }
 
 if (asyncContext == null) {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1601797&r1=1601796&r2=1601797&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jun 11 01:55:59 2014
@@ -89,6 +89,11 @@
 56600: In WebdavServlet: Do not waste time generating
 response for broken PROPFIND request. (kkolinko)
   
+  
+Provide a better error message when asynchronous operations are not
+supported by a filter or servlet. Patch provided by Romain Manni-Bucau.
+(violetagg)
+  
 
   
   



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



Re: async error message if not supported

2014-06-10 Thread Violeta Georgieva
Hi,

2014-06-10 21:28 GMT+03:00 Romain Manni-Bucau :
>
> Hi
>
> in /org/apache/catalina/connector/Request.java it would be nice if error
> message if there is a filter/servlet not supporting async would be more
> explicit. Here is the code:
>
> 1654 @Override
> 1655 public AsyncContext startAsync(ServletRequest request,
> 1656 ServletResponse response) {
> 1657 if (!isAsyncSupported()) {
> 1658 throw new IllegalStateException("Not supported.");
> 1659 }
>
> I propose to change it to:
>
> throw new IllegalStateException("A filter or servlet of the current chain
> doesn't support asynchronism.");

Thanks for the report.
This has been fixed in trunk for 8.0.9 and in 7.0.x for 7.0.55 onwards.

Regards,
Violeta


>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau


buildbot success in ASF Buildbot on tomcat-trunk

2014-06-10 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/162

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1601785
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot




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



Re: async error message if not supported

2014-06-10 Thread Romain Manni-Bucau
Thanks!
Le 11 juin 2014 02:58, "Violeta Georgieva"  a écrit :

> Hi,
>
> 2014-06-10 21:28 GMT+03:00 Romain Manni-Bucau :
> >
> > Hi
> >
> > in /org/apache/catalina/connector/Request.java it would be nice if error
> > message if there is a filter/servlet not supporting async would be more
> > explicit. Here is the code:
> >
> > 1654 @Override
> > 1655 public AsyncContext startAsync(ServletRequest request,
> > 1656 ServletResponse response) {
> > 1657 if (!isAsyncSupported()) {
> > 1658 throw new IllegalStateException("Not supported.");
> > 1659 }
> >
> > I propose to change it to:
> >
> > throw new IllegalStateException("A filter or servlet of the current chain
> > doesn't support asynchronism.");
>
> Thanks for the report.
> This has been fixed in trunk for 8.0.9 and in 7.0.x for 7.0.55 onwards.
>
> Regards,
> Violeta
>
>
> >
> > Romain Manni-Bucau
> > Twitter: @rmannibucau
> > Blog: http://rmannibucau.wordpress.com/
> > LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > Github: https://github.com/rmannibucau
>