[Bug 59654] Jsp spec violation in tld identifying?

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59654

--- Comment #1 from Huxing Zhang  ---
Created attachment 33908
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33908=edit
patch against tomcat 7 trunk

-- 
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 59654] New: Jsp spec violation in tld identifying?

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59654

Bug ID: 59654
   Summary: Jsp spec violation in tld identifying?
   Product: Tomcat 7
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: major
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: huxing.zh...@gmail.com

What the spec says:
JSP.7.3.1 Identifying Tag Library Descriptors
...
TLD files should not be placed in /WEB-INF/classes or /WEB-INF/lib, and must
not be placed inside /WEB-INF/tags or a subdirectory of it, unless named
implicit.tld and intended to configure an implicit tag library with its JSP
version and tlib-version.


Out test case:
We have simple web app with the following structure:

test
├── WEB-INF
│   ├── classes
│   └── tags
│   └── test.tld
└── taglib.jsp

test.tld:




  
  
  1.0
  f
  
get
java.lang.System
java.lang.String
getProperty(java.lang.String)
  


taglib.jsp:

<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tags/test.tld" prefix="f"%>


${f:get("java.home")}



Tomcat 7.0.69 behavior:
After deploying the test web app and visit
http://localhost:8080/test/taglib.jsp, the jsp page gets compiled and java home
has been correctly displayed.

Tomcat 8 & 9 trunk behavior:
When visiting http://localhost:8080/test/taglib.jsp, server responded with HTTP
500:

HTTP Status 500 - Unable to find taglib "f" for URI: /WEB-INF/tags/test.tld

org.apache.jasper.JasperException: Unable to find taglib "f" for URI:
/WEB-INF/tags/test.tld
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
   
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:277)
   
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
   
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:183)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:421)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:479)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1435)
org.apache.jasper.compiler.Parser.parse(Parser.java:139)
   
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)
   
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)


Conclusion:
Clearly the tomcat 7 behavior is against spec, which I think should be fixed.


Analysis:
After some digging, I found that the tld file is skipped during tld scan phase.
However, when parsing tag lib directive, the
org.apache.jasper.compiler.TagLibraryInfoImpl#generateTLDLocation didn't check
the tld file location that is prohibited by spec.
Since the implementation is quite different between tomcat 7 % tomcat 8+. I
found it hard to backport the tomcat 8 implementation to tomcat 7. Therefore,
the fix should be specific to tomcat 7(tomcat 6 is not investigated.)


Proposed Fix:
Please refer to the attachment.
I've added a dedicated message to indicate such an behaivor is violating spec.

p.s. 
Should we also add the dedicated message to tomcat 8+ ? Because the message
"Unable to find taglib "f" for URI: /WEB-INF/tags/test.tld"  is somewhat
confusing. The file does exist, it is the spec that requires tomcat not to load
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



[Bug 59653] Bug Tracker

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59653

Chuck Caldarale  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

--- Comment #1 from Chuck Caldarale  ---
Bugzilla is not a playground.

-- 
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 59653] Bug Tracker

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59653

Arijit Dey  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

-- 
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 59653] New: Bug Tracker

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59653

Bug ID: 59653
   Summary: Bug Tracker
   Product: Tomcat 8
   Version: 8.5.x-trunk
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: arijit.a@accenture.com

-- 
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: r1746509 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 22:31:34 2016
New Revision: 1746509

URL: http://svn.apache.org/viewvc?rev=1746509=rev
Log:
Follow-up to r1746503. Need to return used SocketProcessors to the cache.

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

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=1746509=1746508=1746509=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
22:31:34 2016
@@ -2216,11 +2216,20 @@ public class AprEndpoint extends Abstrac
 
 @Override
 protected void doRun() {
-// Process the request from this socket
-SocketState state = getHandler().process(socketWrapper, event);
-if (state == Handler.SocketState.CLOSED) {
-// Close socket and pool
-closeSocket(socketWrapper.getSocket().longValue());
+try {
+// Process the request from this socket
+SocketState state = getHandler().process(socketWrapper, event);
+if (state == Handler.SocketState.CLOSED) {
+// Close socket and pool
+closeSocket(socketWrapper.getSocket().longValue());
+}
+} finally {
+socketWrapper = null;
+event = null;
+//return to cache
+if (running && !paused) {
+processorCache.push(this);
+}
 }
 }
 }



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



svn commit: r1746507 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 22:29:01 2016
New Revision: 1746507

URL: http://svn.apache.org/viewvc?rev=1746507=rev
Log:
Remove unnecessary code. The caches are cleared in stop().

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746507=1746506=1746507=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
22:29:01 2016
@@ -263,8 +263,6 @@ public class Nio2Endpoint extends Abstra
 super.unbind();
 // Unlike other connectors, the thread pool is tied to the server 
socket
 shutdownExecutor();
-this.nioChannels.clear();
-this.processorCache.clear();
 if (getHandler() != null) {
 getHandler().recycle();
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746507=1746506=1746507=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
22:29:01 2016
@@ -333,8 +333,6 @@ public class NioEndpoint extends Abstrac
 serverSock = null;
 destroySsl();
 super.unbind();
-this.nioChannels.clear();
-this.processorCache.clear();
 if (getHandler() != null ) {
 getHandler().recycle();
 }



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



svn commit: r1746506 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 22:27:31 2016
New Revision: 1746506

URL: http://svn.apache.org/viewvc?rev=1746506=rev
Log:
Simplify. Method is only called from a single location.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746506=1746505=1746506=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
22:27:31 2016
@@ -136,15 +136,6 @@ public class Nio2Endpoint extends Abstra
 }
 
 
-protected void releaseCaches() {
-this.nioChannels.clear();
-this.processorCache.clear();
-if (getHandler() != null) {
-getHandler().recycle();
-}
-}
-
-
 // - Public Methods
 
 /**
@@ -272,7 +263,11 @@ public class Nio2Endpoint extends Abstra
 super.unbind();
 // Unlike other connectors, the thread pool is tied to the server 
socket
 shutdownExecutor();
-releaseCaches();
+this.nioChannels.clear();
+this.processorCache.clear();
+if (getHandler() != null) {
+getHandler().recycle();
+}
 }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746506=1746505=1746506=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
22:27:31 2016
@@ -195,15 +195,6 @@ public class NioEndpoint extends Abstrac
 }
 
 
-protected void releaseCaches() {
-this.nioChannels.clear();
-this.processorCache.clear();
-if (getHandler() != null ) {
-getHandler().recycle();
-}
-}
-
-
 // - Public Methods
 /**
  * Number of keep-alive sockets.
@@ -342,7 +333,11 @@ public class NioEndpoint extends Abstrac
 serverSock = null;
 destroySsl();
 super.unbind();
-releaseCaches();
+this.nioChannels.clear();
+this.processorCache.clear();
+if (getHandler() != null ) {
+getHandler().recycle();
+}
 selectorPool.close();
 if (log.isDebugEnabled()) {
 log.debug("Destroy completed for "+new 
InetSocketAddress(getAddress(),getPort()));



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



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

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 22:25:02 2016
New Revision: 1746505

URL: http://svn.apache.org/viewvc?rev=1746505=rev
Log:
Pull up processSocket and definition of processorCache

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/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.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=1746505=1746504=1746505=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed Jun  
1 22:25:02 2016
@@ -26,10 +26,13 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
+import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.juli.logging.Log;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.IntrospectionUtils;
+import org.apache.tomcat.util.collections.SynchronizedStack;
 import org.apache.tomcat.util.net.AbstractEndpoint.Acceptor.AcceptorState;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.threads.LimitLatch;
@@ -178,6 +181,10 @@ public abstract class AbstractEndpoint> processorCache;
 
 // - 
Properties
 
@@ -771,14 +778,46 @@ public abstract class AbstractEndpoint socketWrapper,
-SocketEvent socketStatus, boolean dispatch);
+public boolean processSocket(SocketWrapperBase socketWrapper,
+SocketEvent event, boolean dispatch) {
+try {
+if (socketWrapper == null) {
+return false;
+}
+SocketProcessorBase sc = processorCache.pop();
+if (sc == null) {
+sc = createSocketProcessor(socketWrapper, event);
+} else {
+sc.reset(socketWrapper, event);
+}
+Executor executor = getExecutor();
+if (dispatch && executor != null) {
+executor.execute(sc);
+} else {
+sc.run();
+}
+} catch (RejectedExecutionException ree) {
+getLog().warn(sm.getString("endpoint.executor.fail", 
socketWrapper) , ree);
+return false;
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+// This means we got an OOM or similar creating a thread, or that
+// the pool and its queue are full
+getLog().error(sm.getString("endpoint.process.fail"), t);
+return false;
+}
+return true;
+}
+
+
+protected abstract SocketProcessorBase createSocketProcessor(
+SocketWrapperBase socketWrapper, SocketEvent event);
 
 
 // --- Lifecycle 
methods

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=1746505=1746504=1746505=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
22:25:02 2016
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.Lock;
@@ -107,10 +106,6 @@ public class AprEndpoint extends Abstrac
 
 private final Map connections = new 
ConcurrentHashMap<>();
 
-/**
- * Cache for SocketProcessor objects
- */
-private SynchronizedStack processorCache;
 
 //  Constructor
 
@@ -821,37 +816,12 @@ public class AprEndpoint extends Abstrac
 
 
 @Override
-public boolean processSocket(SocketWrapperBase socketWrapper,
-SocketEvent event, boolean dispatch) {
-try {
-if (socketWrapper == null) {
-return false;
-}
-SocketProcessor sc = processorCache.pop();
-if (sc == null) {
-sc = new SocketProcessor(socketWrapper, event);
-} else {
-sc.reset(socketWrapper, event);
-}
-Executor executor = getExecutor();
-if (dispatch 

svn commit: r1746504 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:55:59 2016
New Revision: 1746504

URL: http://svn.apache.org/viewvc?rev=1746504=rev
Log:
Remove unnecessary sync block.
SocketProcessor.run() will acquire a lock on the SocketWrapper and there is 
nothing that happens before that point that requires a lock to be held on the 
SocketWrapper. Therefore this lock can be removed.

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

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=1746504=1746503=1746504=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
21:55:59 2016
@@ -827,22 +827,17 @@ public class AprEndpoint extends Abstrac
 if (socketWrapper == null) {
 return false;
 }
-// Synchronisation is required here as this code may be called as a
-// result of calling AsyncContext.dispatch() from a non-container
-// thread
-synchronized (socketWrapper) {
-SocketProcessor sc = processorCache.pop();
-if (sc == null) {
-sc = new SocketProcessor(socketWrapper, event);
-} else {
-sc.reset(socketWrapper, event);
-}
-Executor executor = getExecutor();
-if (dispatch && executor != null) {
-executor.execute(sc);
-} else {
-sc.run();
-}
+SocketProcessor sc = processorCache.pop();
+if (sc == null) {
+sc = new SocketProcessor(socketWrapper, event);
+} else {
+sc.reset(socketWrapper, event);
+}
+Executor executor = getExecutor();
+if (dispatch && executor != null) {
+executor.execute(sc);
+} else {
+sc.run();
 }
 } catch (RejectedExecutionException ree) {
 log.warn(sm.getString("endpoint.executor.fail", socketWrapper) , 
ree);



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



Re: Information about submitting patches.

2016-06-01 Thread Mark Thomas
On 01/06/2016 22:49, Sadik Kalia wrote:
> Hello,
> 
> I am new to Apache Tomcat and i do not know how to submit a patch. The
> patch does not have to do with a bug fix but it is a change in code that i
> think will give better performance.
> Can you please me explain the way to submit it ?

Create a Bugzilla issue as an enhancement request.

You'll need to provide hard evidence of a performance improvement. Just
"thinking" it will be better is not good enough.

Mark

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



Information about submitting patches.

2016-06-01 Thread Sadik Kalia
Hello,

I am new to Apache Tomcat and i do not know how to submit a patch. The
patch does not have to do with a bug fix but it is a change in code that i
think will give better performance.
Can you please me explain the way to submit it ?

Thank you,
Sadik Kalia


svn commit: r1746503 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:44:37 2016
New Revision: 1746503

URL: http://svn.apache.org/viewvc?rev=1746503=rev
Log:
Add a SocketProcessor cache to align with NIO/NIO2

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

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=1746503=1746502=1746503=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
21:44:37 2016
@@ -51,6 +51,7 @@ import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.buf.ByteBufferUtils;
+import org.apache.tomcat.util.collections.SynchronizedStack;
 import org.apache.tomcat.util.net.AbstractEndpoint.Acceptor.AcceptorState;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.net.SSLHostConfig.Type;
@@ -106,6 +107,11 @@ public class AprEndpoint extends Abstrac
 
 private final Map connections = new 
ConcurrentHashMap<>();
 
+/**
+ * Cache for SocketProcessor objects
+ */
+private SynchronizedStack processorCache;
+
 //  Constructor
 
 public AprEndpoint() {
@@ -533,6 +539,9 @@ public class AprEndpoint extends Abstrac
 running = true;
 paused = false;
 
+processorCache = new 
SynchronizedStack<>(SynchronizedStack.DEFAULT_SIZE,
+socketProperties.getProcessorCache());
+
 // Create worker collection
 if (getExecutor() == null) {
 createExecutor();
@@ -622,6 +631,7 @@ public class AprEndpoint extends Abstrac
 }
 sendfile = null;
 }
+processorCache.clear();
 }
 shutdownExecutor();
 }
@@ -821,12 +831,17 @@ public class AprEndpoint extends Abstrac
 // result of calling AsyncContext.dispatch() from a non-container
 // thread
 synchronized (socketWrapper) {
-SocketProcessor proc = new SocketProcessor(socketWrapper, 
event);
+SocketProcessor sc = processorCache.pop();
+if (sc == null) {
+sc = new SocketProcessor(socketWrapper, event);
+} else {
+sc.reset(socketWrapper, event);
+}
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
-executor.execute(proc);
+executor.execute(sc);
 } else {
-proc.run();
+sc.run();
 }
 }
 } catch (RejectedExecutionException ree) {



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



svn commit: r1746501 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:37:12 2016
New Revision: 1746501

URL: http://svn.apache.org/viewvc?rev=1746501=rev
Log:
Make processSocket() more like NIO/NIO2

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

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=1746501=1746500=1746501=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
21:37:12 2016
@@ -804,24 +804,24 @@ public class AprEndpoint extends Abstrac
  * false which indicates an error occurred and that 
the
  * socket should be closed
  */
-public boolean processSocket(long socket, SocketEvent event) {
+protected boolean processSocket(long socket, SocketEvent event) {
 SocketWrapperBase socketWrapper = 
connections.get(Long.valueOf(socket));
-if (socketWrapper != null) {
-return processSocket(socketWrapper, event, true);
-}
-return true;
+return processSocket(socketWrapper, event, true);
 }
 
 
 @Override
-public boolean processSocket(SocketWrapperBase socket, SocketEvent 
event,
-boolean dispatch) {
+public boolean processSocket(SocketWrapperBase socketWrapper,
+SocketEvent event, boolean dispatch) {
 try {
+if (socketWrapper == null) {
+return false;
+}
 // Synchronisation is required here as this code may be called as a
 // result of calling AsyncContext.dispatch() from a non-container
 // thread
-synchronized (socket) {
-SocketProcessor proc = new SocketProcessor(socket, event);
+synchronized (socketWrapper) {
+SocketProcessor proc = new SocketProcessor(socketWrapper, 
event);
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
 executor.execute(proc);
@@ -830,7 +830,7 @@ public class AprEndpoint extends Abstrac
 }
 }
 } catch (RejectedExecutionException ree) {
-log.warn(sm.getString("endpoint.executor.fail", socket) , ree);
+log.warn(sm.getString("endpoint.executor.fail", socketWrapper) , 
ree);
 return false;
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);



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



svn commit: r1746500 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:31:07 2016
New Revision: 1746500

URL: http://svn.apache.org/viewvc?rev=1746500=rev
Log:
Align processSocket() implementations for NIO and NIO2.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746500=1746499=1746500=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
21:31:07 2016
@@ -380,6 +380,9 @@ public class Nio2Endpoint extends Abstra
 public boolean  processSocket(SocketWrapperBase socketWrapper,
 SocketEvent event, boolean dispatch) {
 try {
+if (socketWrapper == null) {
+return false;
+}
 SocketProcessor sc = processorCache.pop();
 if (sc == null) {
 sc = new SocketProcessor(socketWrapper, event);
@@ -393,7 +396,7 @@ public class Nio2Endpoint extends Abstra
 sc.run();
 }
 } catch (RejectedExecutionException ree) {
-log.debug(sm.getString("endpoint.executor.fail", socketWrapper), 
ree);
+log.warn(sm.getString("endpoint.executor.fail", socketWrapper), 
ree);
 return false;
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746500=1746499=1746500=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
21:31:07 2016
@@ -441,8 +441,11 @@ public class NioEndpoint extends Abstrac
 return false;
 }
 SocketProcessor sc = processorCache.pop();
-if ( sc == null ) sc = new SocketProcessor(socketWrapper, event);
-else sc.reset(socketWrapper, event);
+if (sc == null) {
+sc = new SocketProcessor(socketWrapper, event);
+} else {
+sc.reset(socketWrapper, event);
+}
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
 executor.execute(sc);



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



buildbot success in on tomcat-trunk

2016-06-01 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/1415

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1746496
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



svn commit: r1746499 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AprEndpoint.java LocalStrings.properties

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:27:14 2016
New Revision: 1746499

URL: http://svn.apache.org/viewvc?rev=1746499=rev
Log:
status -> event
Simplify. The endpoint.warn.noExector was added to handle Comet related issues 
on connector stop so is no longer required.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties

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=1746499=1746498=1746499=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
21:27:14 2016
@@ -798,49 +798,30 @@ public class AprEndpoint extends Abstrac
  * Process the given socket. Typically keep alive or upgraded protocol.
  *
  * @param socketThe socket to process
- * @param statusThe current status of the socket
+ * @param event The event to process
  *
  * @return true if the processing completed normally otherwise
  * false which indicates an error occurred and that 
the
  * socket should be closed
  */
-public boolean processSocket(long socket, SocketEvent status) {
-try {
-Executor executor = getExecutor();
-if (executor == null) {
-log.warn(sm.getString("endpoint.warn.noExector",
-Long.valueOf(socket), null));
-} else {
-SocketWrapperBase wrapper =
-connections.get(Long.valueOf(socket));
-// Make sure connection hasn't been closed
-if (wrapper != null) {
-executor.execute(new SocketProcessor(wrapper, status));
-}
-}
-} catch (RejectedExecutionException x) {
-log.warn("Socket processing request was rejected for:"+socket,x);
-return false;
-} catch (Throwable t) {
-ExceptionUtils.handleThrowable(t);
-// This means we got an OOM or similar creating a thread, or that
-// the pool and its queue are full
-log.error(sm.getString("endpoint.process.fail"), t);
-return false;
+public boolean processSocket(long socket, SocketEvent event) {
+SocketWrapperBase socketWrapper = 
connections.get(Long.valueOf(socket));
+if (socketWrapper != null) {
+return processSocket(socketWrapper, event, true);
 }
 return true;
 }
 
 
 @Override
-public boolean processSocket(SocketWrapperBase socket, SocketEvent 
status,
+public boolean processSocket(SocketWrapperBase socket, SocketEvent 
event,
 boolean dispatch) {
 try {
 // Synchronisation is required here as this code may be called as a
 // result of calling AsyncContext.dispatch() from a non-container
 // thread
 synchronized (socket) {
-SocketProcessor proc = new SocketProcessor(socket, status);
+SocketProcessor proc = new SocketProcessor(socket, event);
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
 executor.execute(proc);

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties?rev=1746499=1746498=1746499=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties Wed 
Jun  1 21:27:14 2016
@@ -17,7 +17,6 @@
 endpoint.err.close=Caught exception trying to close socket
 endpoint.err.handshake=Handshake failed
 endpoint.err.unexpected=Unexpected error processing socket
-endpoint.warn.noExector=Failed to process socket [{0}] in state [{1}] because 
the executor had already been shutdown
 endpoint.warn.unlockAcceptorFailed=Acceptor thread [{0}] failed to unlock. 
Forcing hard socket shutdown.
 endpoint.warn.executorShutdown=The executor associated with thread pool [{0}] 
has not fully shutdown. Some application threads may still be running.
 endpoint.warn.noRemoteAddr=Unable to determine remote address for socket [{0}]



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



svn commit: r1746496 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:17:18 2016
New Revision: 1746496

URL: http://svn.apache.org/viewvc?rev=1746496=rev
Log:
Merge duplicate methods.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746496=1746495=1746496=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
21:17:18 2016
@@ -358,7 +358,7 @@ public class Nio2Endpoint extends Abstra
 socketWrapper.setReadTimeout(getSoTimeout());
 socketWrapper.setWriteTimeout(getSoTimeout());
 // Continue processing on another thread
-return processSocket0(socketWrapper, SocketEvent.OPEN_READ, true);
+return processSocket(socketWrapper, SocketEvent.OPEN_READ, true);
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
 log.error("",t);
@@ -378,17 +378,13 @@ public class Nio2Endpoint extends Abstra
 
 @Override
 public boolean  processSocket(SocketWrapperBase socketWrapper,
-SocketEvent socketStatus, boolean dispatch) {
-return processSocket0(socketWrapper, socketStatus, dispatch);
-}
-
-protected boolean processSocket0(SocketWrapperBase 
socketWrapper, SocketEvent status, boolean dispatch) {
+SocketEvent event, boolean dispatch) {
 try {
 SocketProcessor sc = processorCache.pop();
 if (sc == null) {
-sc = new SocketProcessor(socketWrapper, status);
+sc = new SocketProcessor(socketWrapper, event);
 } else {
-sc.reset(socketWrapper, status);
+sc.reset(socketWrapper, event);
 }
 Executor executor = getExecutor();
 if (dispatch && executor != null) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746496=1746495=1746496=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
21:17:18 2016
@@ -436,10 +436,6 @@ public class NioEndpoint extends Abstrac
 @Override
 public boolean processSocket(SocketWrapperBase socketWrapper,
 SocketEvent event, boolean dispatch) {
-return processSocket((NioSocketWrapper) socketWrapper, event, 
dispatch);
-}
-
-protected boolean processSocket(NioSocketWrapper socketWrapper, 
SocketEvent event, boolean dispatch) {
 try {
 if (socketWrapper == null) {
 return false;



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



buildbot exception in on tomcat-trunk

2016-06-01 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/1414

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1746495
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



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

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 21:06:43 2016
New Revision: 1746495

URL: http://svn.apache.org/viewvc?rev=1746495=rev
Log:
Add a boolean return to the abstract processSocket() method facilitate the 
merging of the two processSocket() methods in each of the end points.

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/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.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=1746495=1746494=1746495=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed Jun  
1 21:06:43 2016
@@ -774,8 +774,10 @@ public abstract class AbstractEndpoint socketWrapper,
+public abstract boolean processSocket(SocketWrapperBase socketWrapper,
 SocketEvent socketStatus, boolean dispatch);
 
 

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=1746495=1746494=1746495=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
21:06:43 2016
@@ -833,7 +833,7 @@ public class AprEndpoint extends Abstrac
 
 
 @Override
-public void processSocket(SocketWrapperBase socket, SocketEvent 
status,
+public boolean processSocket(SocketWrapperBase socket, SocketEvent 
status,
 boolean dispatch) {
 try {
 // Synchronisation is required here as this code may be called as a
@@ -850,12 +850,15 @@ public class AprEndpoint extends Abstrac
 }
 } catch (RejectedExecutionException ree) {
 log.warn(sm.getString("endpoint.executor.fail", socket) , ree);
+return false;
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
 // This means we got an OOM or similar creating a thread, or that
 // the pool and its queue are full
 log.error(sm.getString("endpoint.process.fail"), t);
+return false;
 }
+return true;
 }
 
 private void closeSocket(long socket) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746495=1746494=1746495=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
21:06:43 2016
@@ -377,9 +377,9 @@ public class Nio2Endpoint extends Abstra
 }
 
 @Override
-public void processSocket(SocketWrapperBase socketWrapper,
+public boolean  processSocket(SocketWrapperBase socketWrapper,
 SocketEvent socketStatus, boolean dispatch) {
-processSocket0(socketWrapper, socketStatus, dispatch);
+return processSocket0(socketWrapper, socketStatus, dispatch);
 }
 
 protected boolean processSocket0(SocketWrapperBase 
socketWrapper, SocketEvent status, boolean dispatch) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746495=1746494=1746495=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
21:06:43 2016
@@ -434,9 +434,9 @@ public class NioEndpoint extends Abstrac
 
 
 @Override
-public void processSocket(SocketWrapperBase socketWrapper,
+public boolean processSocket(SocketWrapperBase socketWrapper,
 SocketEvent event, boolean dispatch) {
-processSocket((NioSocketWrapper) socketWrapper, event, dispatch);
+return processSocket((NioSocketWrapper) socketWrapper, event, 
dispatch);
 }
 
 protected boolean processSocket(NioSocketWrapper socketWrapper, 
SocketEvent event, boolean dispatch) {



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



buildbot success in on tomcat-trunk

2016-06-01 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/1413

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1746492
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



[Bug 59604] Invalid url-pattern in servlet mapping on s390x

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59604

--- Comment #26 from Dave  ---
Thanks for the speedy fix.

-- 
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: r1746492 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 19:29:28 2016
New Revision: 1746492

URL: http://svn.apache.org/viewvc?rev=1746492=rev
Log:
Experimental. Remove sync. I can't see why it is needed and I suspect the CI 
tests are failing due to a deadlock caused by the SocketProcessor switching to 
a sync on the socket wrapper.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746492=1746491=1746492=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
19:29:28 2016
@@ -1269,7 +1269,7 @@ public class NioEndpoint extends Abstrac
 
 
 @Override
-protected synchronized void doWrite(boolean block) throws IOException {
+protected void doWrite(boolean block) throws IOException {
 socketBufferHandler.configureWriteBufferForRead();
 
 long writeTimeout = getWriteTimeout();



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



svn commit: r1746490 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AprEndpoint.java Nio2Endpoint.java NioEndpoint.java SocketWrapperBase.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 19:16:48 2016
New Revision: 1746490

URL: http://svn.apache.org/viewvc?rev=1746490=rev
Log:
Remove unnecessary method

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java

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=1746490=1746489=1746490=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
19:16:48 2016
@@ -2465,7 +2465,7 @@ public class AprEndpoint extends Abstrac
 
 
 @Override
-protected void doWriteInternal(boolean block) throws IOException {
+protected void doWrite(boolean block) throws IOException {
 if (closed) {
 throw new IOException(sm.getString("socket.apr.closed", 
getSocket()));
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746490=1746489=1746490=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
19:16:48 2016
@@ -1218,7 +1218,7 @@ public class Nio2Endpoint extends Abstra
  *  blocking case
  */
 @Override
-protected void doWriteInternal(boolean block) throws IOException {
+protected void doWrite(boolean block) throws IOException {
 Future integer = null;
 try {
 socketBufferHandler.configureWriteBufferForRead();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746490=1746489=1746490=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 
19:16:48 2016
@@ -435,18 +435,18 @@ public class NioEndpoint extends Abstrac
 
 @Override
 public void processSocket(SocketWrapperBase socketWrapper,
-SocketEvent socketStatus, boolean dispatch) {
-processSocket((NioSocketWrapper) socketWrapper, socketStatus, 
dispatch);
+SocketEvent event, boolean dispatch) {
+processSocket((NioSocketWrapper) socketWrapper, event, dispatch);
 }
 
-protected boolean processSocket(NioSocketWrapper attachment, SocketEvent 
status, boolean dispatch) {
+protected boolean processSocket(NioSocketWrapper socketWrapper, 
SocketEvent event, boolean dispatch) {
 try {
-if (attachment == null) {
+if (socketWrapper == null) {
 return false;
 }
 SocketProcessor sc = processorCache.pop();
-if ( sc == null ) sc = new SocketProcessor(attachment, status);
-else sc.reset(attachment, status);
+if ( sc == null ) sc = new SocketProcessor(socketWrapper, event);
+else sc.reset(socketWrapper, event);
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
 executor.execute(sc);
@@ -454,7 +454,7 @@ public class NioEndpoint extends Abstrac
 sc.run();
 }
 } catch (RejectedExecutionException ree) {
-log.warn(sm.getString("endpoint.executor.fail", 
attachment.getSocket()), ree);
+log.warn(sm.getString("endpoint.executor.fail", 
socketWrapper.getSocket()), ree);
 return false;
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
@@ -1269,7 +1269,7 @@ public class NioEndpoint extends Abstrac
 
 
 @Override
-protected synchronized void doWriteInternal(boolean block) throws 
IOException {
+protected synchronized void doWrite(boolean block) throws IOException {
 socketBufferHandler.configureWriteBufferForRead();
 
 long writeTimeout = getWriteTimeout();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java?rev=1746490=1746489=1746490=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
(original)
+++ 

[Bug 59650] NIO2 connector does not respect executor bounds, reuses NIO.2 threads for processing request on connections

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59650

Remy Maucherat  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID
 OS||All

--- Comment #1 from Remy Maucherat  ---
The NIO2 connector wraps the executor as the thread group, this executor should
respect the thread count limits, etc.
// Create worker collection
if ( getExecutor() == null ) {
createExecutor();
}
if (getExecutor() instanceof ExecutorService) {
threadGroup =
AsynchronousChannelGroup.withThreadPool((ExecutorService) getExecutor());
}

What is the problem exactly ?

-- 
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 59650] New: NIO2 connector does not respect executor bounds, reuses NIO.2 threads for processing request on connections

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59650

Bug ID: 59650
   Summary: NIO2 connector does not respect executor bounds,
reuses NIO.2 threads for processing request on
connections
   Product: Tomcat 8
   Version: 8.0.x-trunk
  Hardware: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: rsan...@gmail.com

Summary: On Async servlets, after one request is complete and the connection is
kept alive, the next request on this connection utilizes the Async channel
group thread that was used to (asynchronously) process the previous request.

Expected: All incoming requests should be processed by (or at least the
processing should start by) the attached executor on the connector.

More: It may be arguable that it is an implementation detail on how tomcat nio2
connector deals with async servlet requests, in this case it may use the
underlying async channel group threads to process another incoming request, but
it is wrong for the following reasons.
1) The next request coming on the connection may not be for an async servlet.
So semantically it should use the executor thread.
2) Application developer may have decided (which is a very common case)to have
their own executor internally to process all the async requests.

Problem: There is no way to limit the number of processing threads. Also a nice
to have feature would be to allow the user to control the number of threads
used by the underlying async channel group (that java NIO.2 uses for
callbacks). Currently tomcat8 just uses default which leads to an unbounded
number of threads.

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



buildbot success in on tomcat-8-trunk

2016-06-01 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/643

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1746475
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



[Bug 59649] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59649

Mark Thomas  changed:

   What|Removed |Added

   Severity|critical|major

--- Comment #2 from Mark Thomas  ---
Dropping severity to default.

-- 
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 59649] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59649

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Mark Thomas  ---
Steps to reproduce please. We need the minimal possible test case that
demonstrates the issue.

-- 
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 59640] provide better error message on TldCache.getTaglibXml TldResourcePath problem

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59640

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
remm had already fixed this for 9.0.0.M6 and 8.5.2. I back-ported it to 8.0.x
for 8.0.36 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



svn commit: r1746475 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/jasper/compiler/TagLibraryInfoImpl.java java/org/apache/jasper/compiler/TldCache.java java/org/apache/jasper/resources/LocalStrings.

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 15:07:37 2016
New Revision: 1746475

URL: http://svn.apache.org/viewvc?rev=1746475=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59640
Back port remm's NPE fix for missing TLDs

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
tomcat/tc8.0.x/trunk/java/org/apache/jasper/compiler/TldCache.java

tomcat/tc8.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun  1 15:07:37 2016
@@ -1,2 +1,2 @@
 /tomcat/tc8.5.x/trunk:1735042,1737966,1743139-1743140,1744151
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 

svn commit: r1746474 - in /tomcat/tc8.5.x/trunk: ./ webapps/docs/changelog.xml

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 15:03:47 2016
New Revision: 1746474

URL: http://svn.apache.org/viewvc?rev=1746474=rev
Log:
Since reported as a bug so add the reference

Modified:
tomcat/tc8.5.x/trunk/   (props changed)
tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun  1 15:03:47 2016
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501,1741677
 
,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427
+/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501,1741677
 
,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746473

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1746474=1746473=1746474=diff
==
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Wed Jun  1 15:03:47 2016
@@ -403,7 +403,7 @@
 application is deployed as a packed WAR. (markt)
   
   
-NPEs with not found TLDs. (remm)
+59640: NPEs with not found TLDs. (remm)
   
 
   



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



svn commit: r1746473 - /tomcat/trunk/webapps/docs/changelog.xml

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 15:03:13 2016
New Revision: 1746473

URL: http://svn.apache.org/viewvc?rev=1746473=rev
Log:
Since reported as a bug so add the reference

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1746473=1746472=1746473=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jun  1 15:03:13 2016
@@ -436,7 +436,7 @@
 application is deployed as a packed WAR. (markt)
   
   
-NPEs with not found TLDs. (remm)
+59640: NPEs with not found TLDs. (remm)
   
 
   



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



Re: Early Access builds of JDK 9 b118 & JDK 9 with Project Jigsaw, b118 (#4987) are available on java.net

2016-06-01 Thread Rory O'Donnell

Hi Mark,

JDK-8158237  : JVMTI 
hides critical debug information for memory leak tracing


Is closed as a duplicate of JDK-8033735 
 : make 
Throwable.backtrace visible to Class.getDeclaredField again.


And this bug was fixed in JDK9 build 116.

Can you confirm ?

Rgds,Rory


On 20/05/2016 15:17, Rory O'Donnell wrote:

Thanks Mark!



On 20 May 2016, at 14:51, Mark Thomas  wrote:


On 19/05/2016 11:05, Rory O'Donnell wrote:
Hi Mark,

I just had some time to review your email in detail, can you log bugs
for items
3,4 and 5 and send me the JI numbers ?

See in-line.

Many thanks,

Mark


3. Memory leak in sun.rmi.transport.GC
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-May/040893.html

JI-9038057


4. API to trace RMI Target memory leaks without resorting to reflection
(I accept that this is unlikely but If you don't ask...)
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-May/040855.html

JI-9038059


5. Rare memory leak in sun.security.pkcs11.SunPKCS11 poller thread
http://mail.openjdk.java.net/pipermail/security-dev/2016-May/013841.html

Looks like someone created a bug for this:
https://bugs.openjdk.java.net/browse/JDK-8156841




--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland



[Bug 59649] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59649

ismeet  changed:

   What|Removed |Added

 CC||ism...@ms-technology.com
 OS||All

-- 
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 59649] New: org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59649

Bug ID: 59649
   Summary: org.apache.coyote.http11.Http11Processor.service Error
parsing HTTP request header
   Product: Tomcat 9
   Version: 9.0.0.M6
  Hardware: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: ism...@ms-technology.com

With this tomcat version. Working under stress with http POST calls being fired
for uploading and downloading of files. After about 10 to 15 into the test we
started seeing broken responses.

On investigating the logs we noticed below errors:

01-Jun-2016 18:52:16.153 INFO [http-nio-8080-exec-2]
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request
header
 Note: further occurrences of HTTP header parsing errors will be logged at
DEBUG level.
 java.lang.IllegalStateException: Unexpected state: headers already parsed.
Buffer not recycled?
at
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:589)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1002)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:788)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1485)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

01-Jun-2016 18:52:16.154 SEVERE [http-nio-8080-exec-4]
org.apache.coyote.http11.Http11Processor.service Error processing request
 java.lang.NullPointerException
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:389)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1102)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:788)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1485)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

01-Jun-2016 18:52:16.160 SEVERE [http-nio-8080-exec-4]
org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
 java.lang.NullPointerException
at
org.apache.coyote.http11.Http11OutputBuffer.commit(Http11OutputBuffer.java:351)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:646)
at
org.apache.coyote.http11.Http11Processor.endRequest(Http11Processor.java:1785)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1143)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:788)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1485)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

-- 
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 59642] Mention localDataSource in realm-howto.html

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59642

--- Comment #1 from Christopher Schultz  ---
Would you care to propose a patch? It should be very easy, and you an get your
name in the changelog. ;)

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



buildbot failure in on tomcat-trunk

2016-06-01 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/1410

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1746441
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



buildbot failure in on tomcat-8-trunk

2016-06-01 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/642

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1746430
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



svn commit: r1746441 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AprEndpoint.java Nio2Endpoint.java NioEndpoint.java SocketProcessorBase.java

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 11:56:03 2016
New Revision: 1746441

URL: http://svn.apache.org/viewvc?rev=1746441=rev
Log:
Pull up synchronization block

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProcessorBase.java

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=1746441=1746440=1746441=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jun  1 
11:56:03 2016
@@ -2246,20 +2246,17 @@ public class AprEndpoint extends Abstrac
  */
 protected class SocketProcessor extends  SocketProcessorBase {
 
-public SocketProcessor(SocketWrapperBase socket,
-SocketEvent event) {
-super(socket, event);
+public SocketProcessor(SocketWrapperBase socketWrapper, 
SocketEvent event) {
+super(socketWrapper, event);
 }
 
 @Override
-public void run() {
-synchronized (socketWrapper) {
-// Process the request from this socket
-SocketState state = getHandler().process(socketWrapper, event);
-if (state == Handler.SocketState.CLOSED) {
-// Close socket and pool
-closeSocket(socketWrapper.getSocket().longValue());
-}
+protected void doRun() {
+// Process the request from this socket
+SocketState state = getHandler().process(socketWrapper, event);
+if (state == Handler.SocketState.CLOSED) {
+// Close socket and pool
+closeSocket(socketWrapper.getSocket().longValue());
 }
 }
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746441=1746440=1746441=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 
11:56:03 2016
@@ -1623,95 +1623,93 @@ public class Nio2Endpoint extends Abstra
 }
 
 @Override
-public void run() {
-synchronized (socketWrapper) {
-if (SocketEvent.OPEN_WRITE != event) {
-// Anything other than OPEN_WRITE is a genuine read or an
-// error condition so for all of those release the 
semaphore
-((Nio2SocketWrapper) socketWrapper).releaseReadPending();
-}
-boolean launch = false;
-try {
-int handshake = -1;
+protected void doRun() {
+if (SocketEvent.OPEN_WRITE != event) {
+// Anything other than OPEN_WRITE is a genuine read or an
+// error condition so for all of those release the semaphore
+((Nio2SocketWrapper) socketWrapper).releaseReadPending();
+}
+boolean launch = false;
+try {
+int handshake = -1;
 
-try {
-// For STOP there is no point trying to handshake as 
the
-// Poller has been stopped.
-if (!socketWrapper.getSocket().isHandshakeComplete() 
&& event == SocketEvent.ERROR) {
-handshake = -1;
-} else if 
(socketWrapper.getSocket().isHandshakeComplete() ||
-event == SocketEvent.STOP ||
-event == SocketEvent.ERROR) {
-handshake = 0;
-} else {
-handshake = socketWrapper.getSocket().handshake();
-// The handshake process reads/writes from/to the
-// socket. status may therefore be OPEN_WRITE once
-// the handshake completes. However, the handshake
-// happens when the socket is opened so the status
-// must always be OPEN_READ after it completes. It
-// is OK to always set this as it is only used if
-// the handshake completes.
-event = SocketEvent.OPEN_READ;
-}
-} catch (IOException x) {
+try {
+// For STOP there is no 

[Bug 59604] Invalid url-pattern in servlet mapping on s390x

2016-06-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59604

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #25 from Mark Thomas  ---
Thanks for the shell access. It really speed up debugging this.

The bug has been fixed in:
- trunk for 9.0.0.M7 onwards
- 8.5.x for 8.5.3 onwards
- 8.0.x for 8.0.36 onwards

7.0.x and earlier were not affected.

-- 
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: r1746430 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/util/buf/UDecoder.java webapps/docs/changelog.xml

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 11:20:23 2016
New Revision: 1746430

URL: http://svn.apache.org/viewvc?rev=1746430=rev
Log:
Correct the assumption made in the URL decoding that the default platform 
encoding is always compatible with ISO-8859-1. This assumption is not always 
valid, e.g. on z/OS.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/buf/UDecoder.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun  1 11:20:23 2016
@@ -1,2 +1,2 @@
 /tomcat/tc8.5.x/trunk:1735042,1737966,1743139-1743140,1744151
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 

svn commit: r1746428 - in /tomcat/tc8.5.x/trunk: ./ java/org/apache/tomcat/util/buf/UDecoder.java webapps/docs/changelog.xml

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 11:19:31 2016
New Revision: 1746428

URL: http://svn.apache.org/viewvc?rev=1746428=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59604
Correct the assumption made in the URL decoding that the default platform 
encoding is always compatible with ISO-8859-1. This assumption is not always 
valid, e.g. on z/OS.

Modified:
tomcat/tc8.5.x/trunk/   (props changed)
tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/buf/UDecoder.java
tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun  1 11:19:31 2016
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501,1741677
 
,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344
+/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501,1741677
 
,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/buf/UDecoder.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/buf/UDecoder.java?rev=1746428=1746427=1746428=diff
==
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/buf/UDecoder.java 
(original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/buf/UDecoder.java Wed Jun  
1 11:19:31 2016
@@ -347,6 +347,7 @@ public final class UDecoder {
 try {
 if (enc == null) {
 bytes = str.getBytes(StandardCharsets.ISO_8859_1);
+enc = "ISO-8859-1";
 } else {
 bytes = str.getBytes(B2CConverter.getCharset(enc));
 }

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: 

svn commit: r1746427 - in /tomcat/trunk: java/org/apache/tomcat/util/buf/UDecoder.java webapps/docs/changelog.xml

2016-06-01 Thread markt
Author: markt
Date: Wed Jun  1 11:18:45 2016
New Revision: 1746427

URL: http://svn.apache.org/viewvc?rev=1746427=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59604
Correct the assumption made in the URL decoding that the default platform 
encoding is always compatible with ISO-8859-1. This assumption is not always 
valid, e.g. on z/OS.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java?rev=1746427=1746426=1746427=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java Wed Jun  1 
11:18:45 2016
@@ -347,6 +347,7 @@ public final class UDecoder {
 try {
 if (enc == null) {
 bytes = str.getBytes(StandardCharsets.ISO_8859_1);
+enc = "ISO-8859-1";
 } else {
 bytes = str.getBytes(B2CConverter.getCharset(enc));
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1746427=1746426=1746427=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jun  1 11:18:45 2016
@@ -67,6 +67,11 @@
 increase in the reports of memory leaks for some time. (markt)
   
   
+59604: Correct the assumption made in the URL decoding that
+the default platform encoding is always compatible with ISO-8859-1. 
This
+assumption is not always valid, e.g. on z/OS. (markt)
+  
+  
 59608: Skip over any invalid Class-Path 
attribute
 from JAR manifests. Log errors at debug level due to many bad 
libraries.
 (remm)



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