Re: svn commit: r1646359 - /tomcat/trunk/java/org/apache/coyote/Response.java
On 18/12/2014 07:31, Konstantin Kolinko wrote: > 2014-12-18 1:48 GMT+03:00 : >> Author: markt >> Date: Wed Dec 17 22:48:48 2014 >> New Revision: 1646359 >> >> URL: http://svn.apache.org/r1646359 >> Log: >> Remove code highlighted as unused by UCDetector >> >> Modified: >> tomcat/trunk/java/org/apache/coyote/Response.java >> >> Modified: tomcat/trunk/java/org/apache/coyote/Response.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1646359&r1=1646358&r2=1646359&view=diff >> == >> --- tomcat/trunk/java/org/apache/coyote/Response.java (original) >> +++ tomcat/trunk/java/org/apache/coyote/Response.java Wed Dec 17 22:48:48 >> 2014 >> @@ -132,10 +132,6 @@ public final class Response { >> this.req=req; >> } >> >> -public OutputBuffer getOutputBuffer() { >> -return outputBuffer; >> -} >> - >> >> public void setOutputBuffer(OutputBuffer outputBuffer) { >> this.outputBuffer = outputBuffer; >> > > > Is it a good idea to remove getter method, while setter method is > there and not removed? The setter is used, the getter isn't and it isn't a field configured by reflection. I think it is a good idea to remove code we are never going to use but I take the point that this change looks odd. > I am -0 on this (technically it has not broken anything yet to be a > veto, but it looks as a wrong change to me). If you'd prefer me to revert this change, I'm happy to do so. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646420 - /tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
Author: violetagg Date: Thu Dec 18 09:51:32 2014 New Revision: 1646420 URL: http://svn.apache.org/r1646420 Log: Provide the correct array size when invoking toArray() Modified: tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Modified: tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1646420&r1=1646419&r2=1646420&view=diff == --- tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java (original) +++ tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Thu Dec 18 09:51:32 2014 @@ -434,7 +434,7 @@ public class StandardRoot extends Lifecy @Override public WebResourceSet[] getPreResources() { -return preResources.toArray(new WebResourceSet[0]); +return preResources.toArray(new WebResourceSet[preResources.size()]); } @Override @@ -445,7 +445,7 @@ public class StandardRoot extends Lifecy @Override public WebResourceSet[] getJarResources() { -return jarResources.toArray(new WebResourceSet[0]); +return jarResources.toArray(new WebResourceSet[jarResources.size()]); } @Override @@ -456,11 +456,11 @@ public class StandardRoot extends Lifecy @Override public WebResourceSet[] getPostResources() { -return postResources.toArray(new WebResourceSet[0]); +return postResources.toArray(new WebResourceSet[postResources.size()]); } protected WebResourceSet[] getClassResources() { -return classResources.toArray(new WebResourceSet[0]); +return classResources.toArray(new WebResourceSet[classResources.size()]); } protected void addClassResources(WebResourceSet webResourceSet) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646423 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/webresources/StandardRoot.java
Author: violetagg Date: Thu Dec 18 09:56:21 2014 New Revision: 1646423 URL: http://svn.apache.org/r1646423 Log: Merged revision 1646420 from tomcat/trunk: Provide the correct array size when invoking toArray() Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/StandardRoot.java Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Dec 18 09:56:21 2014 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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 +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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,1646420 Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/StandardRoot.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1646423&r1=1646422&r2=1646423&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/StandardRoot.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/StandardRoot.java Thu Dec 18 09:56:21 2014 @@ -432,7 +432,7 @@ public class StandardRoot extends Lifecy @Override public WebResourceSet[] getPreResources() { -return preResources.toArray(new WebResourceSet[0]); +return preResources.toArray(new WebResourceSet[preResources.size()]); } @Override @@ -443,7 +443,7 @@ public class StandardRoot extends Lifecy @Override public WebResourceSet[] getJarResources() { -return jarResources.toArray(new WebResourceSet[0]); +return jarResources.toArray(new WebResourceSet[jarResources.size()]); } @Override @@ -454,11 +454,11 @@ public class StandardRoot extends Lifecy @Override public WebResourceSet[] getPostResources() { -return postResources.toArray(new WebResourceSet[0]); +return postResources.toArray(new WebResourceSet[postResources.size()]); } protected WebResourceSet[] getClassResources() { -return classResources.toArray(new WebResourceSet[0]); +return classResources.toArray(new WebResourceSet[classResources.size()]); } protected void addClassResources(WebResourceSet webResourceSet) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56021] SSL connector using windows-my keystore
https://issues.apache.org/bugzilla/show_bug.cgi?id=56021 --- Comment #3 from Asanka --- 1. Make sure you have the correct keyAlias, following openssl command should show alias as the common name (CN) - openssl pkcs12 -info -in filename.pfx 2. Certificate needs to be installed to the LocalMachine\My store if the tomcat service runs with log on as local system. The CurrentUser\My store is not accessible from other user accounts. You can use powershell to install and verify the cert in the LocalMachine\My store. -- 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: r1646445 - in /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net: SSLSupport.java jsse/JSSESupport.java
Author: markt Date: Thu Dec 18 12:54:17 2014 New Revision: 1646445 URL: http://svn.apache.org/r1646445 Log: Remove unused method Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java?rev=1646445&r1=1646444&r2=1646445&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java Thu Dec 18 12:54:17 2014 @@ -80,17 +80,12 @@ public interface SSLSupport { /** * The client certificate chain (if any). + * + * @param force If true, then re-negotiate the connection and + * request a client certificate if a client certificate has not + * already been requested. */ -public Object[] getPeerCertificateChain() -throws IOException; - -/** - * The client certificate chain (if any). - * @param force If true, then re-negotiate the - * connection if necessary. - */ -public Object[] getPeerCertificateChain(boolean force) -throws IOException; +public Object[] getPeerCertificateChain(boolean force) throws IOException; /** * Get the keysize. Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1646445&r1=1646444&r2=1646445&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Thu Dec 18 12:54:17 2014 @@ -85,12 +85,6 @@ class JSSESupport implements SSLSupport, return session.getCipherSuite(); } -@Override -public Object[] getPeerCertificateChain() -throws IOException { -return getPeerCertificateChain(false); -} - protected java.security.cert.X509Certificate [] getX509Certificates( SSLSession session) { Certificate [] certs=null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646446 - in /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net: SSLSupport.java jsse/JSSESupport.java
Author: markt Date: Thu Dec 18 12:56:16 2014 New Revision: 1646446 URL: http://svn.apache.org/r1646446 Log: Servlet API requires java.security.cert.X509Certificate[] so be explicit about this in the support class. Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java?rev=1646446&r1=1646445&r2=1646446&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java Thu Dec 18 12:56:16 2014 @@ -18,6 +18,7 @@ package org.apache.tomcat.util.net; import java.io.IOException; +import java.security.cert.X509Certificate; /** * Defines an interface to interact with SSL sessions. @@ -85,7 +86,7 @@ public interface SSLSupport { * request a client certificate if a client certificate has not * already been requested. */ -public Object[] getPeerCertificateChain(boolean force) throws IOException; +public X509Certificate[] getPeerCertificateChain(boolean force) throws IOException; /** * Get the keysize. Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1646446&r1=1646445&r2=1646446&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Thu Dec 18 12:56:16 2014 @@ -126,7 +126,7 @@ class JSSESupport implements SSLSupport, } @Override -public Object[] getPeerCertificateChain(boolean force) +public java.security.cert.X509Certificate[] getPeerCertificateChain(boolean force) throws IOException { // Look up the current SSLSession if (session == null) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646448 - in /tomcat/trunk/java/org/apache/tomcat/util/net: SSLSupport.java jsse/JSSESupport.java
Author: markt Date: Thu Dec 18 13:00:04 2014 New Revision: 1646448 URL: http://svn.apache.org/r1646448 Log: Remove unused method Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java?rev=1646448&r1=1646447&r2=1646448&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java Thu Dec 18 13:00:04 2014 @@ -80,12 +80,6 @@ public interface SSLSupport { /** * The client certificate chain (if any). - */ -public Object[] getPeerCertificateChain() -throws IOException; - -/** - * The client certificate chain (if any). * @param force If true, then re-negotiate the * connection if necessary. */ Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1646448&r1=1646447&r2=1646448&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Thu Dec 18 13:00:04 2014 @@ -85,12 +85,6 @@ class JSSESupport implements SSLSupport, return session.getCipherSuite(); } -@Override -public Object[] getPeerCertificateChain() -throws IOException { -return getPeerCertificateChain(false); -} - protected java.security.cert.X509Certificate [] getX509Certificates( SSLSession session) { Certificate [] certs=null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646449 - in /tomcat/trunk/java/org/apache/tomcat/util/net: SSLSupport.java jsse/JSSESupport.java
Author: markt Date: Thu Dec 18 13:01:41 2014 New Revision: 1646449 URL: http://svn.apache.org/r1646449 Log: Servlet API requires java.security.cert.X509Certificate[] so be explicit about this in the support class. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java?rev=1646449&r1=1646448&r2=1646449&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java Thu Dec 18 13:01:41 2014 @@ -18,6 +18,7 @@ package org.apache.tomcat.util.net; import java.io.IOException; +import java.security.cert.X509Certificate; /** * Defines an interface to interact with SSL sessions. @@ -80,11 +81,12 @@ public interface SSLSupport { /** * The client certificate chain (if any). - * @param force If true, then re-negotiate the - * connection if necessary. + * + * @param force If true, then re-negotiate the connection and + * request a client certificate if a client certificate has not + * already been requested. */ -public Object[] getPeerCertificateChain(boolean force) -throws IOException; +public X509Certificate[] getPeerCertificateChain(boolean force) throws IOException; /** * Get the keysize. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1646449&r1=1646448&r2=1646449&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Thu Dec 18 13:01:41 2014 @@ -126,7 +126,7 @@ class JSSESupport implements SSLSupport, } @Override -public Object[] getPeerCertificateChain(boolean force) +public java.security.cert.X509Certificate[] getPeerCertificateChain(boolean force) throws IOException { // Look up the current SSLSession if (session == null) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #6 from Nikita Zyulyaev --- (In reply to Mark Thomas from comment #5) > I have committed a fix for this to trunk (Tomcat 9.0.x). Are you able to > check out trunk from svn, build it and comfirm whether or not this fixes the > issue for you? I'm afraid we are not able to run our application on Tomcat 9.0.x. Please port your changes to 7.0.x branch. -- 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 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #7 from Mark Thomas --- Are you able to build 7.0.x from svn and test against that? -- 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 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #8 from Nikita Zyulyaev --- (In reply to Mark Thomas from comment #7) > Are you able to build 7.0.x from svn and test against that? Of course. -- 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 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #9 from Mark Thomas --- Great - not all users are able/willing to do that. I'll get the back-ports done now. -- 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: r1646456 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/coyote/http11/upgrade/ java/org/apache/tomcat/util/net/
Author: markt Date: Thu Dec 18 13:31:16 2014 New Revision: 1646456 URL: http://svn.apache.org/r1646456 Log: Simplify. NioChannel.getAttachment(boolean) was only ever called with a parameter of false. Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletInputStream.java tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Dec 18 13:31:16 2014 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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,1646420 +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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,1646302,1646420 Modified: tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1646456&r1=1646455&r2=1646456&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Thu Dec 18 13:31:16 2014 @@ -61,7 +61,7 @@ public class AjpNioProcessor extends Abs protected void registerForEvent(boolean read, boolean write) { final NioChannel socket = socketWrapper.getSocket(); final NioEndpoint.KeyAttachment attach = -(NioEndpoint.KeyAttachment) socket.getAttachment(false); +(NioEndpoint.KeyAttachment) socket.getAttachment(); if (attach == null) { return; } @@ -83,7 +83,7 @@ public class AjpNioProcessor extends Abs // poller. Therefore, it needs to be reset once asycn processing has // finished. final NioEndpoint.KeyAttachment attach = - (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(false); + (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(); if (!getErrorState().isError() && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpo
svn commit: r1646458 - /tomcat/tc8.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
Author: markt Date: Thu Dec 18 13:56:19 2014 New Revision: 1646458 URL: http://svn.apache.org/r1646458 Log: Small improvement to the test Modified: tomcat/tc8.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Modified: tomcat/tc8.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1646458&r1=1646457&r2=1646458&view=diff == --- tomcat/tc8.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java (original) +++ tomcat/tc8.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Thu Dec 18 13:56:19 2014 @@ -436,7 +436,8 @@ public class TestCometProcessor extends } else { log.info(status); } -assertTrue("Comet END event not received", +assertTrue("Comet END event not received", servlet.getEndEventOccurred()); +assertTrue("Comet END event not last event received", EventType.END.equals(servlet.getLastEvent())); } @@ -521,7 +522,9 @@ public class TestCometProcessor extends response.getWriter().print("Client: " + msg + "\r\n"); event.close(); } else { -response.getWriter().print(event.getEventSubType() + "\r\n"); +String msg = event.getEventType() + ":" + event.getEventSubType() + "\r\n"; +System.out.print(msg); +response.getWriter().print(msg); event.close(); } response.getWriter().flush(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646460 - /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Author: markt Date: Thu Dec 18 14:05:05 2014 New Revision: 1646460 URL: http://svn.apache.org/r1646460 Log: Use the provided atomic method to replace the attachment and return a reference to the old value. Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1646460&r1=1646459&r2=1646460&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Dec 18 14:05:05 2014 @@ -961,11 +961,11 @@ public class NioEndpoint extends Abstrac return; // don't close on comet timeout } } else { -// Don't dispatch if the lines below are canceling the key +// Don't dispatch if the lines below are cancelling the key processSocket(ka, status, false); } } -key.attach(null); +ka = (KeyAttachment) key.attach(null); if (ka!=null) handler.release(ka); else handler.release((SocketChannel)key.channel()); if (key.isValid()) key.cancel(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646461 - /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Author: markt Date: Thu Dec 18 14:14:50 2014 New Revision: 1646461 URL: http://svn.apache.org/r1646461 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 Ensure that Socket and SocketWrapper are only returned to the cache once on socket close (it is possible for multiple threads to call close concurrently). Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1646461&r1=1646460&r2=1646461&view=diff == --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Dec 18 14:14:50 2014 @@ -950,15 +950,16 @@ public class NioEndpoint extends Abstrac addEvent(r); } -public void cancelledKey(SelectionKey key, SocketStatus status) { +public KeyAttachment cancelledKey(SelectionKey key, SocketStatus status) { +KeyAttachment ka = null; try { -if ( key == null ) return;//nothing to do -KeyAttachment ka = (KeyAttachment) key.attachment(); +if ( key == null ) return null;//nothing to do +ka = (KeyAttachment) key.attachment(); if (ka != null && ka.isComet() && status != null) { ka.setComet(false);//to avoid a loop if (status == SocketStatus.TIMEOUT ) { if (processSocket(ka, status, true)) { -return; // don't close on comet timeout +return null; // don't close on comet timeout } } else { // Don't dispatch if the lines below are cancelling the key @@ -1005,6 +1006,7 @@ public class NioEndpoint extends Abstrac ExceptionUtils.handleThrowable(e); if (log.isDebugEnabled()) log.error("",e); } +return ka; } /** * The background thread that listens for incoming TCP/IP connections and @@ -1559,13 +1561,20 @@ public class NioEndpoint extends Abstrac // Close socket and pool try { ka.setComet(false); -socket.getPoller().cancelledKey(key, SocketStatus.ERROR); -if (running && !paused) { -nioChannels.push(socket); -} -socket = null; -if (running && !paused) { -keyCache.push(ka); +if (socket.getPoller().cancelledKey(key, SocketStatus.ERROR) != null) { +// SocketWrapper (attachment) was removed from the +// key - recycle both. This can only happen once +// per attempted closure so it is used to determine +// whether or not to return socket and ka to +// their respective caches. We do NOT want to do +// this more than once - see BZ 57340. +if (running && !paused) { +nioChannels.push(socket); +} +socket = null; +if (running && !paused) { +keyCache.push(ka); +} } ka = null; } catch (Exception x) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646462 - in /tomcat/tc8.0.x/trunk: ./ webapps/docs/changelog.xml
Author: markt Date: Thu Dec 18 14:16:47 2014 New Revision: 1646462 URL: http://svn.apache.org/r1646462 Log: Update changelog Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Dec 18 14:16:47 2014 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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,1646302,1646420 +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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,1646302,1646304,1646420 Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1646462&r1=1646461&r2=1646462&view=diff == --- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Thu Dec 18 14:16:47 2014 @@ -217,6 +217,11 @@ Connection: close response header. (markt) +57340: When using Comet, ensure that Socket and SocketWrapper +are only returned to their respective caches once on socket close (it is +possible for multiple threads to call close concurrently). (markt) + + 57347: AJP response contains wrong status reason phrase (rjung) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646464 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/comet/TestCometProcessor.java
Author: markt Date: Thu Dec 18 14:21:07 2014 New Revision: 1646464 URL: http://svn.apache.org/r1646464 Log: Small improvement to the test Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Dec 18 14:21:07 2014 @@ -1,2 +1,2 @@ -/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920 +/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458 /tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114 ,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342 498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346365,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1352056,1352059,1 352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,1353501,1353581,1353708,1354137,1354170,1354197,1354255,1354362,1354375,1354469,1354664,1354685,1354817,1354847,1354856,1355726,1355810,1356006-1356007,1356014,1356045,1356125,1356422,1356505,1356898,1357042,1357401,1357407,1358586,1358590,1358612-1358613,1359102,1359340,1359981,1360059,1360455,1360460,1360838,1360847,1360892,1360
svn commit: r1646465 - in /tomcat/tc7.0.x/trunk/java/org/apache: coyote/ajp/ coyote/http11/ coyote/http11/upgrade/ tomcat/util/net/
Author: markt Date: Thu Dec 18 14:24:09 2014 New Revision: 1646465 URL: http://svn.apache.org/r1646465 Log: Simplify. NioChannel.getAttachment(boolean) was only ever called with a parameter of false. Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletInputStream.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1646465&r1=1646464&r2=1646465&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Thu Dec 18 14:24:09 2014 @@ -254,7 +254,7 @@ public class AjpNioProcessor extends Abs if (param == null) return; long timeout = ((Long)param).longValue(); final KeyAttachment ka = - (KeyAttachment)socketWrapper.getSocket().getAttachment(false); +(KeyAttachment)socketWrapper.getSocket().getAttachment(); ka.setTimeout(timeout); break; } @@ -275,7 +275,7 @@ public class AjpNioProcessor extends Abs // poller. Therefore, it needs to be reset once asycn processing has // finished. final KeyAttachment attach = -(KeyAttachment)socketWrapper.getSocket().getAttachment(false); +(KeyAttachment)socketWrapper.getSocket().getAttachment(); if (!getErrorState().isError() && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpoint.getSoTimeout(); @@ -296,7 +296,7 @@ public class AjpNioProcessor extends Abs throws IOException { KeyAttachment att = -(KeyAttachment) socketWrapper.getSocket().getAttachment(false); +(KeyAttachment) socketWrapper.getSocket().getAttachment(); if ( att == null ) throw new IOException("Key must be cancelled"); ByteBuffer writeBuffer = @@ -363,7 +363,7 @@ public class AjpNioProcessor extends Abs } try { NioEndpoint.KeyAttachment att = -(NioEndpoint.KeyAttachment) socketWrapper.getSocket().getAttachment(false); +(NioEndpoint.KeyAttachment) socketWrapper.getSocket().getAttachment(); if ( att == null ) throw new IOException("Key must be cancelled."); nRead = pool.read(readBuffer, socketWrapper.getSocket(), selector, att.getTimeout()); Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1646465&r1=1646464&r2=1646465&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Thu Dec 18 14:24:09 2014 @@ -112,7 +112,7 @@ public class Http11NioProcessor extends long soTimeout = endpoint.getSoTimeout(); RequestInfo rp = request.getRequestProcessor(); -final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(false); +final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(); try { rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE); if (!getAdapter().event(request, response, status)) { @@ -169,7 +169,7 @@ public class Http11NioProcessor extends @Override protected void resetTimeouts() { -final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(false); +final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(); if (!getErrorState().isError() && attach != null && asyncStateMachine.isAsyncDispatching()) { long soTimeout = endpoint.getSoTimeout(); @@ -459,10 +459,10
svn commit: r1646466 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Author: markt Date: Thu Dec 18 14:26:01 2014 New Revision: 1646466 URL: http://svn.apache.org/r1646466 Log: Use the provided atomic method to replace the attachment and return a reference to the old value. Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1646466&r1=1646465&r2=1646466&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Dec 18 14:26:01 2014 @@ -1091,10 +1091,11 @@ public class NioEndpoint extends Abstrac return; // don't close on comet timeout } } else { -processSocket(ka.getChannel(), status, false); //don't dispatch if the lines below are cancelling the key +// Don't dispatch if the lines below are cancelling the key +processSocket(ka.getChannel(), status, false); } } -key.attach(null); +ka = (KeyAttachment) key.attach(null); if (ka!=null) handler.release(ka); else handler.release((SocketChannel)key.channel()); if (key.isValid()) key.cancel(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1643766 - /tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
Hi, 2014-12-10 17:43 GMT+02:00 Christopher Schultz : > > Violetta, > > On 12/8/14 4:04 AM, violet...@apache.org wrote: > > Author: violetagg > > Date: Mon Dec 8 09:04:56 2014 > > New Revision: 1643766 > > > > URL: http://svn.apache.org/r1643766 > > Log: > > Extract several "protected" methods in order to make StandardRoot easier for extending. > > > > Modified: > > tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java > > > > Modified: tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java > > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1643766&r1=1643765&r2=1643766&view=diff > > == > > --- tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java (original) > > +++ tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Mon Dec 8 09:04:56 2014 > > @@ -457,6 +457,10 @@ public class StandardRoot extends Lifecy > > return postResources.toArray(new WebResourceSet[0]); > > } > > > > +protected WebResourceSet[] getClassResources() { > > +return classResources.toArray(new WebResourceSet[0]); > > Any reason not to properly-size the argument to toArray? If you pass-in > WebResourceSet[0], you create an array that can't be used for anything, > then toArray needs to create another one for you, so you get two array > allocations when only one is necessary. Fixed with r1646420 Thanks, Violeta > -chris > > > +} > > + > > @Override > > public void setAllowLinking(boolean allowLinking) { > > this.allowLinking = allowLinking; > > @@ -633,9 +637,7 @@ public class StandardRoot extends Lifecy > > > > cacheJmxName = register(cache, getObjectNameKeyProperties() + ",name=Cache"); > > > > -// Ensure support for jar:war:file:/ URLs will be available (required > > -// for resource JARs in packed WAR files). > > -TomcatURLStreamHandlerFactory.register(); > > +registerURLStreamHandlerFactory(); > > > > if (context == null) { > > throw new IllegalStateException( > > @@ -649,29 +651,17 @@ public class StandardRoot extends Lifecy > > } > > } > > > > +protected void registerURLStreamHandlerFactory() { > > +// Ensure support for jar:war:file:/ URLs will be available (required > > +// for resource JARs in packed WAR files). > > +TomcatURLStreamHandlerFactory.register(); > > +} > > + > > @Override > > protected void startInternal() throws LifecycleException { > > -String docBase = context.getDocBase(); > > - > > mainResources.clear(); > > > > -if (docBase == null) { > > -main = new EmptyResourceSet(this); > > -} else { > > -File f = new File(docBase); > > -if (!f.isAbsolute()) { > > -f = new File(((Host)context.getParent()).getAppBaseFile(), f.getPath()); > > -} > > -if (f.isDirectory()) { > > -main = new DirResourceSet(this, "/", f.getAbsolutePath(), "/"); > > -} else if(f.isFile() && docBase.endsWith(".war")) { > > -main = new JarResourceSet(this, "/", f.getAbsolutePath(), "/"); > > -} else { > > -throw new IllegalArgumentException( > > -sm.getString("standardRoot.startInvalidMain", > > -f.getAbsolutePath())); > > -} > > -} > > +main = createMainResourceSet(); > > > > mainResources.add(main); > > > > @@ -694,6 +684,31 @@ public class StandardRoot extends Lifecy > > setState(LifecycleState.STARTING); > > } > > > > +protected WebResourceSet createMainResourceSet() { > > +String docBase = context.getDocBase(); > > + > > +WebResourceSet mainResourceSet; > > +if (docBase == null) { > > +mainResourceSet = new EmptyResourceSet(this); > > +} else { > > +File f = new File(docBase); > > +if (!f.isAbsolute()) { > > +f = new File(((Host)context.getParent()).getAppBaseFile(), f.getPath()); > > +} > > +if (f.isDirectory()) { > > +mainResourceSet = new DirResourceSet(this, "/", f.getAbsolutePath(), "/"); > > +} else if(f.isFile() && docBase.endsWith(".war")) { > > +mainResourceSet = new JarResourceSet(this, "/", f.getAbsolutePath(), "/"); > > +} else { > > +throw new IllegalArgumentException( > > +sm.getString("standardRoot.startInvalidMain", > > +f.getAbsolutePath())); > > +} > > +} > > + > > +return mainResourceSet; > > +} > > + > > @Override > > protected void stopInternal() throws LifecycleException { > > for (ArrayLi
svn commit: r1646468 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml
Author: markt Date: Thu Dec 18 14:31:41 2014 New Revision: 1646468 URL: http://svn.apache.org/r1646468 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 Ensure that Socket and SocketWrapper are only returned to the cache once on socket close (it is possible for multiple threads to call close concurrently). Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Dec 18 14:31:41 2014 @@ -1,2 +1,2 @@ -/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458 -/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114 ,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342 498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346365,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1352056,1352059,1 352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,1353501,1353581,1353708,1354137,1354170,1354197,1354255,1354362,1354375,1354469,1354664,1354685,1354817,1354847,1354856,1355726,1355810,1356006-1356007,1356014,1356045,1356125,1356422,1356505,1356898,1357042,1357401,1357407,1358586,1358590,1358612-1358613,1359102,1359340,1359981,1360059,1360455,1360460,1360838,1360847,1360892,1360942,1361263,1361430,1361754-1361755,1361762,1361769,1361772,1361962,1361982,1361985,1361991,1364141,1364149,1364411-1364412,1364448,1366708,1366720,1366729,1366734,1366910,1366945,1366953,1366959,1367214,1370346,1370364,1370373,1370386,1370473,1370537,1370549,1370553,1370879,1370916,1370958,1370960,1370973,1371017,137
[Bug 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #10 from Mark Thomas --- Fix applied to 8.0.x for 8.0.16 onwards and to 7.0.x for 7.0.58 onwards. You should be good to build 7.0.x from svn trunk and test now. -- 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: r1646470 - /tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java
Author: markt Date: Thu Dec 18 14:44:28 2014 New Revision: 1646470 URL: http://svn.apache.org/r1646470 Log: Remove unused method spotted by kfujino Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java?rev=1646470&r1=1646469&r2=1646470&view=diff == --- tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java Thu Dec 18 14:44:28 2014 @@ -19,7 +19,6 @@ package org.apache.catalina.authenticato import java.io.IOException; import java.security.Principal; import java.util.Map; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import javax.servlet.ServletException; @@ -376,32 +375,6 @@ public class SingleSignOn extends ValveB } -/** - * Deregister the specified session. If it is the last session, - * then also get rid of the single sign on identifier - * - * @param ssoId Single sign on identifier - * @param session Session to be deregistered - */ -protected void deregister(String ssoId, Session session) { - -reverse.remove(new SingleSignOnSessionKey(session)); - -SingleSignOnEntry sso = cache.get(ssoId); -if (sso == null) { -return; -} - -sso.removeSession(session); - -// see if we are the last session, if so blow away ssoId -Set sessions = sso.findSessions(); -if (sessions == null || sessions.size() == 0) { -cache.remove(ssoId); -} -} - - /** * Deregister the specified single sign on identifier, and invalidate * any associated sessions. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646471 - in /tomcat/trunk/java/org/apache/catalina: authenticator/SingleSignOn.java ha/authenticator/ClusterSingleSignOn.java
Author: markt Date: Thu Dec 18 14:59:48 2014 New Revision: 1646471 URL: http://svn.apache.org/r1646471 Log: kfujino review of BZ 57338 fix. Need to replicate updates to SSOEntry Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java?rev=1646471&r1=1646470&r2=1646471&view=diff == --- tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java Thu Dec 18 14:59:48 2014 @@ -543,8 +543,11 @@ public class SingleSignOn extends ValveB * DIGEST or FORM) * @param username the username (if any) used for the authentication * @param password the password (if any) used for the authentication + * + * @return true if the crednetials were updated, otherwise + * false */ -protected void update(String ssoId, Principal principal, String authType, +protected boolean update(String ssoId, Principal principal, String authType, String username, String password) { SingleSignOnEntry sso = cache.get(ssoId); @@ -554,7 +557,9 @@ public class SingleSignOn extends ValveB } sso.updateCredentials(principal, authType, username, password); +return true; } +return false; } Modified: tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java?rev=1646471&r1=1646470&r2=1646471&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java Thu Dec 18 14:59:48 2014 @@ -16,10 +16,13 @@ */ package org.apache.catalina.ha.authenticator; +import java.security.Principal; + import org.apache.catalina.Container; import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; import org.apache.catalina.authenticator.SingleSignOn; +import org.apache.catalina.authenticator.SingleSignOnEntry; import org.apache.catalina.ha.CatalinaCluster; import org.apache.catalina.ha.ClusterValve; import org.apache.catalina.tribes.tipis.AbstractReplicatedMap.MapOwner; @@ -67,6 +70,19 @@ public class ClusterSingleSignOn extends } +// SingleSignOn Methods + +@Override +protected boolean update(String ssoId, Principal principal, String authType, +String username, String password) { +boolean result = super.update(ssoId, principal, authType, username, password); +if (result) { +((ReplicatedMap) cache).replicate(ssoId, true); +} +return result; +} + + // MapOwner Methods @Override - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1646476 - in /tomcat/trunk: java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java webapps/docs/config/cluster-valve.xml
Author: markt Date: Thu Dec 18 15:23:45 2014 New Revision: 1646476 URL: http://svn.apache.org/r1646476 Log: kfujino review of BZ 57338 fix. Add configuration options for mapSendOptions and terminateOnStartFailure. Document the configuration options. Modified: tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java tomcat/trunk/webapps/docs/config/cluster-valve.xml Modified: tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java?rev=1646476&r1=1646475&r2=1646476&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java Thu Dec 18 15:23:45 2014 @@ -23,8 +23,10 @@ import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; import org.apache.catalina.authenticator.SingleSignOn; import org.apache.catalina.authenticator.SingleSignOnEntry; +import org.apache.catalina.authenticator.SingleSignOnSessionKey; import org.apache.catalina.ha.CatalinaCluster; import org.apache.catalina.ha.ClusterValve; +import org.apache.catalina.tribes.Channel; import org.apache.catalina.tribes.tipis.AbstractReplicatedMap.MapOwner; import org.apache.catalina.tribes.tipis.ReplicatedMap; import org.apache.tomcat.util.ExceptionUtils; @@ -70,6 +72,26 @@ public class ClusterSingleSignOn extends } +private int mapSendOptions = +Channel.SEND_OPTIONS_SYNCHRONIZED_ACK | Channel.SEND_OPTIONS_USE_ACK; +public int getMapSendOptions() { +return mapSendOptions; +} +public void setMapSendOptions(int mapSendOptions) { +this.mapSendOptions = mapSendOptions; +} + + +private boolean terminateOnStartFailure = false; +public boolean getTerminateOnStartFailure() { +return terminateOnStartFailure; +} + +public void setTerminateOnStartFailure(boolean terminateOnStartFailure) { +this.terminateOnStartFailure = terminateOnStartFailure; +} + + // SingleSignOn Methods @Override @@ -120,11 +142,17 @@ public class ClusterSingleSignOn extends ClassLoader[] cls = new ClassLoader[] { this.getClass().getClassLoader() }; -cache = new ReplicatedMap<>(this, cluster.getChannel(), rpcTimeout, -cluster.getClusterName() + "-SSO-cache", cls); -reverse = new ReplicatedMap<>(this, cluster.getChannel(), rpcTimeout, -cluster.getClusterName() + "-SSO-reverse", cls); - +ReplicatedMap cache = new ReplicatedMap<>( +this, cluster.getChannel(), rpcTimeout, cluster.getClusterName() + "-SSO-cache", +cls, terminateOnStartFailure); +cache.setChannelSendOptions(mapSendOptions); +this.cache = cache; + +ReplicatedMap reverse = new ReplicatedMap<>( +this, cluster.getChannel(), rpcTimeout, cluster.getClusterName() + "-SSO-reverse", +cls, terminateOnStartFailure); +reverse.setChannelSendOptions(mapSendOptions); +this.reverse = reverse; } catch (Throwable t) { ExceptionUtils.handleThrowable(t); throw new LifecycleException( Modified: tomcat/trunk/webapps/docs/config/cluster-valve.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-valve.xml?rev=1646476&r1=1646475&r2=1646476&view=diff == --- tomcat/trunk/webapps/docs/config/cluster-valve.xml (original) +++ tomcat/trunk/webapps/docs/config/cluster-valve.xml Thu Dec 18 15:23:45 2014 @@ -122,6 +122,16 @@ Java class name of the implementation to use. This MUST be set to org.apache.catalina.ha.authenticator.ClusterSingleSignOn. + +Sets the host domain to be used for sso cookies. + + +The Valve uses a replicated map. You can setup the flag for how this +map sends messages. The default value is 6 (synchronous). +Note that if you use asynchronous messaging it is possible for update +messages to be processed by the receiving node in a different order to +the order in which they were sent. + Default false. Flag to determine whether each request needs to be reauthenticated to the security Realm. If "true", this @@ -131,8 +141,20 @@ requests based on the presence of a valid SSO cookie, without rechecking with the Realm. - -Sets the host domain to be used for sso cookies. + +The Valve uses a replicated map. This is the timeout for messages +
[Bug 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #11 from Nikita Zyulyaev --- (In reply to Mark Thomas from comment #10) > Fix applied to 8.0.x for 8.0.16 onwards and to 7.0.x for 7.0.58 onwards. > > You should be good to build 7.0.x from svn trunk and test now. I faced a very odd problem running 7.0.58. org/apache/tomcat/util/http/ValuesEnumerator was not included in the tomcat-coyote.jar during ant build. But I applied your changes to the 7.0.47 and they worked successfully. -- 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 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #12 from Mark Thomas --- Not sure what was going on with ValuesEnumerator. Thanks for going the extra mile and working around it. Great to hear that the proposed fix did indeed work. It will be in the next release. -- 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 57367] New: If JAR scan experiences a stack overflow, give the URL from which each class in the loop was loaded in the complaint
https://issues.apache.org/bugzilla/show_bug.cgi?id=57367 Bug ID: 57367 Summary: If JAR scan experiences a stack overflow, give the URL from which each class in the loop was loaded in the complaint Product: Tomcat 7 Version: 7.0.57 Hardware: PC Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: eddie.k...@gmail.com Created attachment 32304 --> https://issues.apache.org/bugzilla/attachment.cgi?id=32304&action=edit Proposed patch that implements the feature enhancement When you get a class loop that causes a stack overflow exception in JAR scanning, the class names are currently listed, but not the location from which each class was loaded. If a class is unexpectedly found in more than one location (which will often be the source of this problem), then one has to search every possible JAR to figure out the root cause. It would really help understand these problems if the location from which each class was loaded was included in the error report. I will attach a proposed patch that adds this. -- 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 57367] If JAR scan experiences a stack overflow, give the URL from which each class in the loop was loaded in the complaint
https://issues.apache.org/bugzilla/show_bug.cgi?id=57367 Edward Kuns changed: What|Removed |Added OS||All --- Comment #1 from Edward Kuns --- The provided patch adds three pieces of information to the current error report: 1) It adds the URL from which each class was loaded, and 2) If the problem is a class loop, e.g., A.class extends B.class which extends A.class, then the error report will now explicitly say it's a loop. 3) If the full list of classes is not provided, then "->..." is added to make it clear that the full list is too long and is not provided. We ran into this when a JAR was in an unexpected place (and an old version of that JAR to boot). Just knowing the classes involved isn't enough! -- 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 57340] NioConnector caches get corrupted on concurrent comet close
https://issues.apache.org/bugzilla/show_bug.cgi?id=57340 --- Comment #13 from Konstantin Kolinko --- (In reply to Nikita Zyulyaev from comment #11) > (In reply to Mark Thomas from comment #10) > > Fix applied to 8.0.x for 8.0.16 onwards and to 7.0.x for 7.0.58 onwards. > > > > You should be good to build 7.0.x from svn trunk and test now. > > I faced a very odd problem running 7.0.58. > org/apache/tomcat/util/http/ValuesEnumerator was not included in the > tomcat-coyote.jar during ant build. > But I applied your changes to the 7.0.47 and they worked successfully. It works for me. I did a clean build and that class was successfully compiled and packed into tomcat-coyote.jar. I expected to find ValuesEnumerator.java, but that package-accessible class is actually defined in MimeHeaders.java. That code is old: the last change to MimeHeaders.java was 2,5 years ago. -- 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 56438] If jar scan does not find context config or TLD config, log a message
https://issues.apache.org/bugzilla/show_bug.cgi?id=56438 Edward Kuns changed: What|Removed |Added CC||eddie.k...@gmail.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
[Bug 56884] Support for HTTP Method PATCH under the AJP protocol
https://issues.apache.org/bugzilla/show_bug.cgi?id=56884 Jason changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Jason --- Thanks Konstantin, I indeed did discover that there was no real problem specifically with the tomcat connecter, Better documentation would be appreciated. Javas default HttpUrlConnectionClient client was the culprit, which is unrelated to this project. A series of poor logging resulted in the original request. -- 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: Back-porting BZ57338 SSO + Cluster improvements
Mark, On 12/16/14 5:52 PM, Mark Thomas wrote: > The fix for BZ 57338 (SSO + cluster) ended up making some fairly > invasive changes so that the implementation was sensible. I'd like to > discuss which - if any - of these changes we'd be happy to back-port to > Tomcat 8 and Tomcat 7. I think you should expend reasonable effort back-porting this to Tomcat 8 as it's actually being used by people (as opposed to trunk/9.0, which is not) and not bother back-porting to Tomcat 7. If it looks like back-porting to Tomcat 8 would be tantamount to doing the same for Tomcat 7 (e.g. the patch set looks pretty much identical), then I'd say go for it. Even though it's not official, I think we should start considering Tomcat 7 to be in semi-maintenance-mode. > [1] Make GenericPrincipal Serializable > I don't see any harm in back-porting this. > > [2] Remove SerializablePrincipal from the cluster implementation > This isn't necessary but is it a nice clean-up that is possible because > of [1]. I'm thinking back-port to 8.0.x only. It depends if > SerializablePrincipal is considered part of the API or an implementation > detail. > > [3] Switch to ConcurrentHashMap and remove syncs > I don't see any harm in back-porting this. > > [4] Remove lookup() method > This changes the API and is not necessary so I think we leave this as is. > > [5] Move sync to method > I don't see any harm in back-porting this. > > [6] Make SSO Maps non-final > This is essential to facilitate the fix so it has to be back-ported. > > [7] Switch to ReplicatedMap > This changes the ClusterSSO API is essential to facilitate the fix so it > has to be back-ported. > > [8] Remove Session from SSO Maps > This changes the SSO API but it is essential to facilitate the fix so it > has to be back-ported. > > [9] Make SingleSignOnEntry Serializable > I don't see any harm in back-porting this. > > [A] Logging TODOs > I don't see any harm in back-porting this. > > In summary, patches [7] and [8] look to be the ones that need the most > careful consideration followed by [2]. > > Thoughts? > > Mark > > > [1] http://svn.apache.org/r1645953 > [2] http://svn.apache.org/r1645955 > [3] http://svn.apache.org/r1646099 > [4] http://svn.apache.org/r1646100 > [5] http://svn.apache.org/r1646101 > [6] http://svn.apache.org/r1646102 > [7] http://svn.apache.org/r1646103 > [8] http://svn.apache.org/r1646104 > [9] http://svn.apache.org/r1646105 > [A] http://svn.apache.org/r1646106 > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > -chris signature.asc Description: OpenPGP digital signature
svn commit: r1646559 - /tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java
Author: markt Date: Thu Dec 18 22:28:26 2014 New Revision: 1646559 URL: http://svn.apache.org/r1646559 Log: Avoid unnecessary object creation Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java?rev=1646559&r1=1646558&r2=1646559&view=diff == --- tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SingleSignOn.java Thu Dec 18 22:28:26 2014 @@ -286,13 +286,12 @@ public class SingleSignOn extends ValveB } Cookie cookie = null; Cookie cookies[] = request.getCookies(); -if (cookies == null) { -cookies = new Cookie[0]; -} -for (int i = 0; i < cookies.length; i++) { -if (Constants.SINGLE_SIGN_ON_COOKIE.equals(cookies[i].getName())) { -cookie = cookies[i]; -break; +if (cookies != null) { +for (int i = 0; i < cookies.length; i++) { +if (Constants.SINGLE_SIGN_ON_COOKIE.equals(cookies[i].getName())) { +cookie = cookies[i]; +break; +} } } if (cookie == null) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-native-make (in module tomcat-native) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-native-make has an issue affecting its community integration. This issue affects 4 projects, and has been outstanding for 42 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-native-make : Tomcat native library using Apache Portable Runtime - tomcat-native-make-install : Tomcat native library using Apache Portable Runtime - tomcat-tc8.0.x-test-apr : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... - tomcat-trunk-test-apr : Tomcat 9.x, a web server implementing the Java Servlet 4.0, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-native/tomcat-native-make/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Failed with reason build failed The following work was performed: http://vmgump.apache.org/gump/public/tomcat-native/tomcat-native-make/gump_work/build_tomcat-native_tomcat-native-make.html Work Name: build_tomcat-native_tomcat-native-make (Type: Build) Work ended in a state of : Failed Elapsed: 7 secs Command Line: make [Working Directory: /srv/gump/public/workspace/tomcat-native/native] - make[1]: Entering directory `/srv/gump/public/workspace/tomcat-native/native' /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/address.lo -c src/address.c && touch src/address.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/bb.lo -c src/bb.c && touch src/bb.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/dir.lo -c src/dir.c && touch src/dir.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/error.lo -c src/error.c && touch src/error.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/file.lo -c src/file.c && touch src/file.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/info.lo -c src/info.c && touch src/info.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat
[GUMP@vmgump]: Project tomcat-native-make (in module tomcat-native) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-native-make has an issue affecting its community integration. This issue affects 4 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-native-make : Tomcat native library using Apache Portable Runtime - tomcat-native-make-install : Tomcat native library using Apache Portable Runtime - tomcat-tc8.0.x-test-apr : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... - tomcat-trunk-test-apr : Tomcat 9.x, a web server implementing the Java Servlet 4.0, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-native/tomcat-native-make/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Failed with reason build failed The following work was performed: http://vmgump.apache.org/gump/public/tomcat-native/tomcat-native-make/gump_work/build_tomcat-native_tomcat-native-make.html Work Name: build_tomcat-native_tomcat-native-make (Type: Build) Work ended in a state of : Failed Elapsed: 13 secs Command Line: make [Working Directory: /srv/gump/public/workspace/tomcat-native/native] - make[1]: Entering directory `/srv/gump/public/workspace/tomcat-native/native' /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/address.lo -c src/address.c && touch src/address.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/bb.lo -c src/bb.c && touch src/bb.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/dir.lo -c src/dir.c && touch src/dir.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/error.lo -c src/error.c && touch src/error.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/file.lo -c src/file.c && touch src/file.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux -I/srv/gump/public/workspace/openssl/dest-20141219/include -I/srv/gump/public/workspace/apr-1/dest-20141219/include/apr-1 -o src/info.lo -c src/info.c && touch src/info.lo /bin/bash /srv/gump/public/workspace/apr-1/dest-20141219/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/srv/gump/public/workspace/tomcat-native/native/include -I/usr/lib/jvm