svn commit: r1393330 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: markt Date: Wed Oct 3 07:26:41 2012 New Revision: 1393330 URL: http://svn.apache.org/viewvc?rev=1393330&view=rev Log: Update changelog prior to 7.0.32 tag Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1393330&r1=1393329&r2=1393330&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Oct 3 07:26:41 2012 @@ -57,11 +57,22 @@ +Revert multiple operation support for the JMXProxyServlet +pending further discussion. (schultz) + + Improve session management in CsrfPreventionFilter. (kkolinko) + + + + Correct the couple of broken links in the Tomcat Javadoc. (markt) + + + @@ -86,6 +97,11 @@ 53828: Use correct status code when closing a WebSocket connection normally in response to a close frame from a client. (markt) + +JMXProxyServlet now allows multiple operation commands like +invokeAndSet, invokeAndGet, +etc. (schultz) + 53843: request.isAsyncStarted() must continue to return true until the dispatch actually happens (which at the earliest - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393331 - in /tomcat/tc7.0.x/tags/TOMCAT_7_0_32: ./ build.properties.default
Author: markt Date: Wed Oct 3 07:28:41 2012 New Revision: 1393331 URL: http://svn.apache.org/viewvc?rev=1393331&view=rev Log: Tag 7.0.32 Added: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ (props changed) - copied from r1393330, tomcat/tc7.0.x/trunk/ Modified: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/build.properties.default Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- bugtraq:append = false Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- --- bugtraq:message (added) +++ bugtraq:message Wed Oct 3 07:28:41 2012 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- bugtraq:number = true Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- bugtraq:warnifnoissue = false Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- --- svn:ignore (added) +++ svn:ignore Wed Oct 3 07:28:41 2012 @@ -0,0 +1,7 @@ +.* +build.properties +logs +nbproject +output +work +*.iml Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Oct 3 07:28:41 2012 @@ -0,0 +1 @@ +/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-1222328,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,1342 320,1342476,1342498,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,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,1 352056,1352059,1352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,13
[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) 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-taglibs-standard has an issue affecting its community integration. This issue affects 2 projects, and has been outstanding for 111 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-taglibs-standard : Standard Taglib - tomcat-taglibs-standard-install : JSP Taglibs Full details are available at: http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Optional dependency httpunit failed with reason build failed -DEBUG- (Apache Gump generated) Apache Maven Settings in: /srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml -INFO- Failed with reason build failed -DEBUG- Maven POM in: /srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build) Work ended in a state of : Failed Elapsed: 30 secs Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings /srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml install [Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard] M2_HOME: /opt/maven2 - [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [debug] execute contextualize [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources [INFO] Copying 3 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] Tests are skipped. [INFO] [bundle:bundle {execution: default-bundle}] [INFO] [install:install {execution: default-install}] [INFO] Installing /srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar to /srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar [INFO] [bundle:install {execution: default-install}] [INFO] Parsing file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml [INFO] Installing org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar [INFO] Writing OBR metadata [INFO] [INFO] Building JSTL Implementation [INFO]task-segment: [install] [INFO] [INFO] [remote-resources:process {execution: default}] [INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking for updates from apache.snapshots [debug] execute contextualize [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 14 resources [INFO] Copying 3 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 96 source files to /srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes [INFO] - [ERROR] COMPILATION ERROR : [INFO] - [ERROR] /srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7] error: DataSourceWrapper is not abstract and does not override abstract method getParentLogger() in CommonDataSource [INFO] 1 error [INFO] - [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure /srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7] error: DataSourceWrapper is not abstract and does not override abstract method getParentLogger() in CommonDataSource [INFO] [INFO] For more information, run Maven with the -e switch [INFO] --
svn commit: r1393339 - /tomcat/trunk/res/maven/mvn-pub.xml
Author: markt Date: Wed Oct 3 08:22:51 2012 New Revision: 1393339 URL: http://svn.apache.org/viewvc?rev=1393339&view=rev Log: Fix typo Modified: tomcat/trunk/res/maven/mvn-pub.xml Modified: tomcat/trunk/res/maven/mvn-pub.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/mvn-pub.xml?rev=1393339&r1=1393338&r2=1393339&view=diff == --- tomcat/trunk/res/maven/mvn-pub.xml (original) +++ tomcat/trunk/res/maven/mvn-pub.xml Wed Oct 3 08:22:51 2012 @@ -320,7 +320,7 @@ - - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[VOTE] Release Apache Tomcat 7.0.32
The proposed Apache Tomcat 7.0.32 release is now available for voting. It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.32/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-087/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ The proposed 7.0.32 release is: [ ] Broken - do not release [ ] Stable - go ahead and release as 7.0.32 Stable Cheers, Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393372 - in /tomcat/trunk/java/org/apache/catalina/valves: AccessLogValve.java ExtendedAccessLogValve.java
Author: markt Date: Wed Oct 3 09:33:25 2012 New Revision: 1393372 URL: http://svn.apache.org/viewvc?rev=1393372&view=rev Log: s/CharBuffer/CharArrayWriter/ since the latter is able to grow while the former isn't. Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1393372&r1=1393371&r2=1393372&view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Wed Oct 3 09:33:25 2012 @@ -18,6 +18,7 @@ package org.apache.catalina.valves; import java.io.BufferedWriter; +import java.io.CharArrayWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -25,7 +26,6 @@ import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.net.InetAddress; -import java.nio.CharBuffer; import java.nio.charset.Charset; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -571,7 +571,7 @@ public class AccessLogValve extends Valv * Buffer pool used for log message generation. Pool used to reduce garbage * generation. */ -private SynchronizedStack charBuffers = +private SynchronizedStack charArrayWriters = new SynchronizedStack<>(); /** @@ -935,21 +935,20 @@ public class AccessLogValve extends Valv long start = request.getCoyoteRequest().getStartTime(); Date date = getDate(start + time); -CharBuffer result = charBuffers.pop(); +CharArrayWriter result = charArrayWriters.pop(); if (result == null) { -result = CharBuffer.allocate(128); +result = new CharArrayWriter(128); } for (int i = 0; i < logElements.length; i++) { logElements[i].addElement(result, date, request, response, time); } -result.flip(); log(result); -if (result.length() <= maxLogMessageBufferSize) { -result.clear(); -charBuffers.push(result); +if (result.size() <= maxLogMessageBufferSize) { +result.reset(); +charArrayWriters.push(result); } } @@ -1011,7 +1010,7 @@ public class AccessLogValve extends Valv * * @param message Message to be logged */ -public void log(CharBuffer message) { +public void log(CharArrayWriter message) { if (rotatable) { // Only do a logfile switch check once a second, max. long systime = System.currentTimeMillis(); @@ -1056,17 +1055,20 @@ public class AccessLogValve extends Valv } // Log this message -synchronized(this) { -if (writer != null) { -writer.write(message.array(), message.arrayOffset(), -message.arrayOffset() + message.limit()); -writer.println(""); -if (!buffered) { -writer.flush(); +try { +synchronized(this) { +if (writer != null) { +message.writeTo(writer); +writer.println(""); +if (!buffered) { +writer.flush(); +} } } +} catch (IOException ioe) { +log.warn(sm.getString( +"accessLogValve.writeFail", message.toString()), ioe); } - } @@ -1242,7 +1244,7 @@ public class AccessLogValve extends Valv * AccessLogElement writes the partial message into the buffer. */ protected interface AccessLogElement { -public void addElement(CharBuffer buf, Date date, Request request, +public void addElement(CharArrayWriter buf, Date date, Request request, Response response, long time); } @@ -1252,7 +1254,7 @@ public class AccessLogValve extends Valv */ protected static class ThreadNameElement implements AccessLogElement { @Override -public void addElement(CharBuffer buf, Date date, Request request, +public void addElement(CharArrayWriter buf, Date date, Request request, Response response, long time) { RequestInfo info = request.getCoyoteRequest().getRequestProcessor(); if(info != null) { @@ -1282,7 +1284,7 @@ public class AccessLogValve extends Valv } @Override -public void addElement(CharBuffer buf, Date date, Request request, +public void addElement(CharArrayWriter buf, Date date, Request request, Response response, long tim
svn commit: r1393373 - in /tomcat/tc7.0.x/trunk: build.properties.default res/maven/mvn.properties.default
Author: markt Date: Wed Oct 3 09:34:48 2012 New Revision: 1393373 URL: http://svn.apache.org/viewvc?rev=1393373&view=rev Log: Prep for next tag Modified: tomcat/tc7.0.x/trunk/build.properties.default tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Modified: tomcat/tc7.0.x/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.properties.default?rev=1393373&r1=1393372&r2=1393373&view=diff == --- tomcat/tc7.0.x/trunk/build.properties.default (original) +++ tomcat/tc7.0.x/trunk/build.properties.default Wed Oct 3 09:34:48 2012 @@ -27,9 +27,9 @@ # - Version Control Flags - version.major=7 version.minor=0 -version.build=32 +version.build=33 version.patch=0 -version.suffix=-dev +version.suffix= # - Build control flags - # Note enabling validation uses Checkstyle which is LGPL licensed Modified: tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default?rev=1393373&r1=1393372&r2=1393373&view=diff == --- tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default (original) +++ tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Wed Oct 3 09:34:48 2012 @@ -35,7 +35,7 @@ maven.asf.release.repo.url=https://repos maven.asf.release.repo.repositoryId=apache.releases # Release version info -maven.asf.release.deploy.version=7.0.32 +maven.asf.release.deploy.version=7.0.33 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393376 - in /tomcat/sandbox/trunk-resources: ./ java/org/apache/catalina/filters/ java/org/apache/catalina/manager/ java/org/apache/catalina/valves/ res/maven/ webapps/docs/
Author: markt Date: Wed Oct 3 09:38:08 2012 New Revision: 1393376 URL: http://svn.apache.org/viewvc?rev=1393376&view=rev Log: Sycn with trunk Modified: tomcat/sandbox/trunk-resources/ (props changed) tomcat/sandbox/trunk-resources/build.properties.default tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/JMXProxyServlet.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/AccessLogValve.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/ExtendedAccessLogValve.java tomcat/sandbox/trunk-resources/res/maven/mvn-pub.xml tomcat/sandbox/trunk-resources/webapps/docs/manager-howto.xml Propchange: tomcat/sandbox/trunk-resources/ -- Merged /tomcat/trunk:r1392656-1393374 Modified: tomcat/sandbox/trunk-resources/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/build.properties.default?rev=1393376&r1=1393375&r2=1393376&view=diff == --- tomcat/sandbox/trunk-resources/build.properties.default (original) +++ tomcat/sandbox/trunk-resources/build.properties.default Wed Oct 3 09:38:08 2012 @@ -188,7 +188,7 @@ junit.jar=${junit.lib}/junit-4.8.2.jar junit.loc=http://cloud.github.com/downloads/KentBeck/junit/junit4.8.2.zip # - Checkstyle, version 5.1 or later - -checkstyle.version=5.5 +checkstyle.version=5.6 checkstyle.home=${base.path}/checkstyle-${checkstyle.version} checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle-${checkstyle.version}-bin.zip checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java?rev=1393376&r1=1393375&r2=1393376&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java Wed Oct 3 09:38:08 2012 @@ -33,6 +33,7 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; +import javax.servlet.http.HttpSession; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -153,15 +154,19 @@ public class CsrfPreventionFilter extend } } -LruCache nonceCache = -(LruCache) req.getSession(true).getAttribute( -Constants.CSRF_NONCE_SESSION_ATTR_NAME); +HttpSession session = req.getSession(false); + +@SuppressWarnings("unchecked") +LruCache nonceCache = (session == null) ? null +: (LruCache) session.getAttribute( +Constants.CSRF_NONCE_SESSION_ATTR_NAME); if (!skipNonceCheck) { String previousNonce = req.getParameter(Constants.CSRF_NONCE_REQUEST_PARAM); -if (nonceCache != null && !nonceCache.contains(previousNonce)) { +if (nonceCache == null || previousNonce == null || +!nonceCache.contains(previousNonce)) { res.sendError(HttpServletResponse.SC_FORBIDDEN); return; } @@ -169,7 +174,10 @@ public class CsrfPreventionFilter extend if (nonceCache == null) { nonceCache = new LruCache<>(nonceCacheSize); -req.getSession().setAttribute( +if (session == null) { +session = req.getSession(true); +} +session.setAttribute( Constants.CSRF_NONCE_SESSION_ATTR_NAME, nonceCache); } Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/JMXProxyServlet.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/JMXProxyServlet.java?rev=1393376&r1=1393375&r2=1393376&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/JMXProxyServlet.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/manager/JMXProxyServlet.java Wed Oct 3 09:38:08 2012 @@ -93,98 +93,33 @@ public class JMXProxyServlet extends Htt return; } -// Invoke an operation, then execute a "get" -if(null != request.getParameter("invokeAndGet")) { -
[Bug 53958] New: Custom error page generates NPE in StandardHostValve.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=53958 Priority: P2 Bug ID: 53958 Assignee: dev@tomcat.apache.org Summary: Custom error page generates NPE in StandardHostValve.java Severity: normal Classification: Unclassified Reporter: sro...@gmail.com Hardware: Macintosh Status: NEW Version: 7.0.30 Component: Catalina Product: Tomcat 7 I've defined a custom error page, /error.jspx. When I access it directly in Tomcat, the page serves, but I see this in the logs: SEVERE: Exception Processing ErrorPage[errorCode=404, location=/error.jspx] java.lang.NullPointerException at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:456) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:327) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Because the page serves (it just says "Error!"), I believe that part is fine, including its declaration as a JSPX file and such. This error page is mapped to common error codes and exceptions too. I am using Tomcat as an embedded server, so, proceeding like: ErrorPage errorPage = new ErrorPage(); errorPage.setErrorCode(404); errorPage.setLocation("/error.jspx"); context.addErrorPage(errorPage); I also get the exception above when generating a 404 error on purpose. In this case, the error page does not show; I see a default Tomcat error page. It seems like the RequestDispatcher for the error page is null in this situation. I am not sure why. I know it's null if the page is outside the web app context, but it isn't here. I think. I am configuring the one and only context for the web app thusly.. Context context = tomcat.addContext("/", contextPath.getAbsolutePath()); Is this my error? a bug? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393381 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: Cache.java LocalStrings.properties
Author: markt Date: Wed Oct 3 10:00:21 2012 New Revision: 1393381 URL: http://svn.apache.org/viewvc?rev=1393381&view=rev Log: Implement cache expiry during getResource() Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java?rev=1393381&r1=1393380&r2=1393381&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java Wed Oct 3 10:00:21 2012 @@ -38,7 +38,8 @@ public class Cache { // based on profiler data. private static final long CACHE_ENTRY_SIZE = 500; -private static final long TARGET_FREE_PERCENT = 5; +private static final long TARGET_FREE_PERCENT_GET = 5; +private static final long TARGET_FREE_PERCENT_BACKGROUND = 10; private final StandardRoot root; private final AtomicLong size = new AtomicLong(0); @@ -83,7 +84,20 @@ public class Cache { size.addAndGet(delta); if (size.get() > maxSize) { -// TODO make room +// Process resources unordered for speed. Trades cache +// efficiency (younger entries may be evicted before older +// ones) for speed since this is on the critical path for +// request processing +long targetSize = +maxSize * (100 - TARGET_FREE_PERCENT_GET) / 100; +long newSize = evict( +targetSize, resourceCache.values().iterator()); +if (newSize > maxSize) { +// Unable to create sufficient space for this resource +// Remove it from the cache +removeCacheEntry(path); +log.warn(sm.getString("cache.addFail")); +} } } else { // Another thread added the entry to the cache @@ -96,19 +110,34 @@ public class Cache { } protected void backgroundProcess() { -long targetSize = maxSize * (100 - TARGET_FREE_PERCENT) / 100; - -long now = System.currentTimeMillis(); - // Create an ordered set of all cached resources with the least recently -// used first. +// used first. This is a background process so we can afford to take the +// time to order the elements first TreeSet orderedResources = new TreeSet<>(new EvictionOrder()); orderedResources.addAll(resourceCache.values()); Iterator iter = orderedResources.iterator(); -while (targetSize > size.get() && iter.hasNext()) { +long targetSize = +maxSize * (100 - TARGET_FREE_PERCENT_BACKGROUND) / 100; +long newSize = evict(targetSize, iter); + +if (targetSize > newSize) { +log.info(sm.getString("cache.backgroundEvictFail", +Long.valueOf(TARGET_FREE_PERCENT_BACKGROUND), +root.getContext().getName(), +Long.valueOf(newSize / 1024))); +} +} + +private long evict(long targetSize, Iterator iter) { + +long now = System.currentTimeMillis(); + +long newSize = size.get(); + +while (targetSize > newSize && iter.hasNext()) { CachedResource resource = iter.next(); // Don't expire anything that has been checked within the TTL @@ -118,15 +147,11 @@ public class Cache { // Remove the entry from the cache removeCacheEntry(resource.getWebappPath()); -} -long cacheSize = size.get(); -if (targetSize > cacheSize) { -log.info(sm.getString("cache.backgroundEvict", -Long.valueOf(TARGET_FREE_PERCENT), -root.getContext().getName(), -Long.valueOf(cacheSize / 1024))); +newSize = size.get(); } + +return newSize; } private void removeCacheEntry(String path) { Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties?rev=1393381&r1=1393380&r2=1393381&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties (original) +++ tomcat/sandbox/trunk-reso
svn commit: r1393385 - in /tomcat/sandbox/trunk-resources: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/webresources/ test/org/apache/catalina/webresources/
Author: markt Date: Wed Oct 3 10:08:58 2012 New Revision: 1393385 URL: http://svn.apache.org/viewvc?rev=1393385&view=rev Log: Last of the caching configuration TODOs Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TesterWebResourceRoot.java Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java?rev=1393385&r1=1393384&r2=1393385&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java Wed Oct 3 10:08:58 2012 @@ -258,6 +258,9 @@ public interface WebResourceRoot extends void setCacheMaxSize(long cacheMaxSize); long getCacheMaxSize(); +void setCacheMaxObjectSize(long cacheMaxObjectSize); +long getCacheMaxObjectSize(); + /** * This method will be invoked by the context on a periodic basis and allows * the implementation a method that executes periodic tasks, such as purging Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java?rev=1393385&r1=1393384&r2=1393385&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardContext.java Wed Oct 3 10:08:58 2012 @@ -4776,12 +4776,10 @@ public class StandardContext extends Con resources.setCachingAllowed(isCachingAllowed()); resources.setCacheTtl(getCacheTTL()); resources.setCacheMaxSize(getCacheMaxSize()); +resources.setCacheMaxObjectSize(getCacheObjectMaxSize()); resources.start(); -// TODO: Implement caching. -// getCacheMaxObjectSize() - if (effectiveMajorVersion >=3 && addWebinfClassesResources) { WebResource webinfClassesResource = resources.getResource( "/WEB-INF/classes/META-INF/resources"); Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java?rev=1393385&r1=1393384&r2=1393385&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Cache.java Wed Oct 3 10:08:58 2012 @@ -46,6 +46,7 @@ public class Cache { private long ttl = 5000; private long maxSize = 10 * 1024 * 1024; +private long maxObjectSize = maxSize / 20; private ConcurrentMap resourceCache = new ConcurrentHashMap<>(); @@ -66,9 +67,13 @@ public class Cache { } if (cacheEntry == null) { +CachedResource newCacheEntry = new CachedResource(root, path, ttl); +if (newCacheEntry.getContentLength() > getMaxObjectSize()) { +return newCacheEntry; +} + // Concurrent callers will end up with the same CachedResource // instance -CachedResource newCacheEntry = new CachedResource(root, path, ttl); cacheEntry = resourceCache.putIfAbsent(path, newCacheEntry); if (cacheEntry == null) { @@ -181,6 +186,15 @@ public class Cache { this.maxSize = maxSize; } + +public void setMaxObjectSize(long maxObjectSize) { +this.maxObjectSize = maxObjectSize; +} + +public long getMaxObjectSize() { +return maxObjectSize; +} + private static class EvictionOrder implements Comparator { @Override Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java?rev=1393385&r1=1393384&r2=1393385&view=diff == --- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java (original) +++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java Wed Oct
[Bug 53958] Custom error page generates NPE in StandardHostValve.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=53958 Konstantin Kolinko changed: What|Removed |Added Status|NEW |NEEDINFO OS||All --- Comment #1 from Konstantin Kolinko --- You should provide exact steps and source code to reproduce this issue. With embedded Tomcat, a lot depends on details of how exactly you initialize it and your application. So you need to provide the actual code. Note that among Tomcat tests, there are several ones that use custom error pages. Searching for ".addErrorPage" through the files, those are o.a.c.core.TestStandardContextValve o.a.c.core.TestStandardHostValve You may use their code as a starting point. -- 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 53958] Custom error page generates NPE in StandardHostValve.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=53958 --- Comment #2 from Sean Owen --- Will do -- I will try to reduce this to a minimal test case. I already caught that maybe the context needs to be "" instead of "/", but that didn't change behavior. -- 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: r1393419 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Wed Oct 3 11:15:37 2012 New Revision: 1393419 URL: http://svn.apache.org/viewvc?rev=1393419&view=rev Log: proposal Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1393419&r1=1393418&r2=1393419&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 3 11:15:37 2012 @@ -134,6 +134,11 @@ PATCHES PROPOSED TO BACKPORT: +1: kfujino -1: +* Improve session management in CsrfPreventionFilter + (Backport of r1393071 from Tomcat 7) + http://people.apache.org/~kkolinko/patches/2012-10-03_tc6_CsrfPreventionFilter.patch + +1: kkolinko + -1: PATCHES/ISSUES THAT ARE STALLED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393427 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Wed Oct 3 11:31:11 2012 New Revision: 1393427 URL: http://svn.apache.org/viewvc?rev=1393427&view=rev Log: vote Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1393427&r1=1393426&r2=1393427&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 3 11:31:11 2012 @@ -129,9 +129,11 @@ PATCHES PROPOSED TO BACKPORT: * Fix a behavior of TcpPingInterceptor#useThread. If set to false, ping thread is never started. + kkolinko: Better wording for the above sentence: + "Do not start a ping thread when useThread is set to false." http://svn.apache.org/viewvc?view=revision&revision=1387073 http://svn.apache.org/viewvc?view=revision&revision=1387487 - +1: kfujino + +1: kfujino, kkolinko -1: * Improve session management in CsrfPreventionFilter - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393528 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: schultz Date: Wed Oct 3 15:05:52 2012 New Revision: 1393528 URL: http://svn.apache.org/viewvc?rev=1393528&view=rev Log: Votes Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1393528&r1=1393527&r2=1393528&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 3 15:05:52 2012 @@ -39,7 +39,7 @@ PATCHES PROPOSED TO BACKPORT: listed and undeployed. http://people.apache.org/~kkolinko/patches/2011-11-14_tc6_HostConfig.patch http://people.apache.org/~kkolinko/patches/2011-11-14_tc6_ContainerBase.patch - +1: kkolinko + +1: kkolinko, schultz +0: kfujino: Question of if host.addChild(context) threw IllegalStateException. E.g. case of deployDirectory. If META-INF/context.xml exist in Directory, context.xml is copied to configBase. @@ -48,7 +48,7 @@ PATCHES PROPOSED TO BACKPORT: If manager app execute undeploy(or delete directory), directory is deleted but context.xml isn't deleted. Should (conf/Catalina/localhost/)context.xml be registered into redeployResources? - Or need to delete context.xml manually? + Or need to delete context.xml manually? -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52918 @@ -78,7 +78,7 @@ PATCHES PROPOSED TO BACKPORT: The nextRequest() method already recycles the filters. If it has been called, then lastActiveFilter is -1 and the new code will be NOOP. http://people.apache.org/~kkolinko/patches/2012-06-02_tc6_recycle.patch - +1: kkolinko + +1: kkolinko, schultz -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53481 @@ -111,20 +111,20 @@ PATCHES PROPOSED TO BACKPORT: Change links on the list of applications in the Manager to point to '/appname/' instead of '/appname'. https://issues.apache.org/bugzilla/attachment.cgi?id=29296 - +1: kkolinko, kfujino + +1: kkolinko, kfujino, schultz -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53800 FileDirContext.list() did not provide correct paths for subdirectories. Patch provided by Kevin Wooten. http://svn.apache.org/viewvc?view=revision&revision=1378819 - +1: kkolinko, kfujino + +1: kkolinko, kfujino, schultz -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53830 Better handling of Manager.randomFile default value on Windows https://issues.apache.org/bugzilla/attachment.cgi?id=29330 - +1: kkolinko + +1: kkolinko, schultz -1: * Fix a behavior of TcpPingInterceptor#useThread. @@ -133,7 +133,7 @@ PATCHES PROPOSED TO BACKPORT: "Do not start a ping thread when useThread is set to false." http://svn.apache.org/viewvc?view=revision&revision=1387073 http://svn.apache.org/viewvc?view=revision&revision=1387487 - +1: kfujino, kkolinko + +1: kfujino, kkolinko, schultz -1: * Improve session management in CsrfPreventionFilter - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.32
On 03/10/2012 10:24, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.32 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.32/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-087/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ > > The proposed 7.0.32 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 7.0.32 Stable Unit tests pass on 64-bit Windows and 64-bit Linux EL TCK passes JSP TCK passes with HTTP (direct) BIO, NIO & APR/native (1.1.24) Servlet TCK passes with - HTTP (direct) BIO, NIO & APR/native (1.1.24) - HTTP (mod_proxy_http) BIO, NIO & APR/native (1.1.24) - AJP (mod_jk) BIO, NIO & APR/native (1.1.24) - AJP (mod_proxy_ajp) BIO, NIO & APR/native (1.1.24) All TCK tests run on 64-bit Linux with a security manager Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53958] Custom error page generates NPE in StandardHostValve.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=53958 --- Comment #3 from Sean Owen --- Created attachment 29441 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29441&action=edit Test program showing NPE error This is a (pretty) minimal example that reproduces the issue describe here. (You will need the generated JSP source code, attached here too.) -- 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 53958] Custom error page generates NPE in StandardHostValve.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=53958 --- Comment #4 from Sean Owen --- Created attachment 29442 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29442&action=edit Accompanying error jspx -- 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 53958] Custom error page generates NPE in StandardHostValve.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=53958 --- Comment #5 from Sean Owen --- Try running Test.java, then browse to "http://localhost:8080/foo"; and see the NullPointerException. I've looked at the examples in test/, and looked at this code, and don't see anything being done wrongly in comparison. It's not exactly the same setup but seems simple and straightforward 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
Surprising implementation of SSL.hasOp
All, I was preparing a 6.0 patch for https://issues.apache.org/bugzilla/show_bug.cgi?id=53481 (Add support for OpenSSL SSLHonorCipherOrder) and I found a missing method SSL.hasOp that is used in trunk and 7.0. The javadoc for SSL.hasOp says: /** * Return true if SSL_OP_ if defined. * * Currently used for testing weather the * SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION is supported by OpenSSL. * * @param op SSL_OP to test. * @return true if SSL_OP is supported by OpenSSL library. */ public static native boolean hasOp(int op); Reading that, I would expect that the native method would check to see if the OpenSSL implementation supported a particular setting. The javadoc says that it's used to check SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, but not that it does not support other checks. Here's the implementation of the native method: TCN_IMPLEMENT_CALL(jboolean, SSL, hasOp)(TCN_STDARGS, jint op) { #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION if (op & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) return JNI_TRUE; #endif return JNI_FALSE; } That very obviously only works specifically for the SSL_OP_ALOW_UNSAFE_LEGACY_RENEGOTIATION flag. I'm glad I found this because I'm using the same method to check for SSL_OP_CIPHER_SERVER_PREFERENCE -- and that call is always going to return FALSE, so this feature doesn't actually work :( Looking at the OpenSSL API (wow, I really miss javadoc), it doesn't appear that there's any function that can sniff the capabilities of the engine and check to see whether a particular option is supported. Instead, the technique of using #ifdefs to conditionally include code that will return TRUE seems to be the only alternative. My addition of this feature now requires an update to tcnative :( Since I'm going to be adding this, shall I try to add any particular subset of SSL options that can be checked? I'm actually wondering if checking for SSL_OP_CIPHER_SERVER_PREFERENCE is worth it, since lack of support from the OpenSSL library is highly unlikely. At any rate, the list of supported options appears to be documented here: http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html#NOTES There are only 26 documented options to check. I'm also wondering if it wouldn't be a good idea to future-proof the implementation of that method by having it throw an exception if you try to check the support-status of an option that isn't known to the code. Something like this: TCN_IMPLEMENT_CALL(jboolean, SSL, hasOp)(TCN_STDARGS, jint op) { int support = 0; #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION if (op & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) { support |= (op & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION); op ^= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; } #endif #ifdef SSL_OP_FOO if (op & SSL_OP_FOO) { support |= (op & SSL_OP_FOO); op ^= SSL_OP_FOO; // Clear FOO } #endif #ifdef SSL_OP_BAR if (op & SSL_OP_BAR) { support |= (op & SSL_OP_BAR); op ^= SSL_OP_BAR; // Clear FOO } #endif if(op) { char message[] tcn_Throw(e, 'Unsupported OpenSSL option to check: %#08lx', op); } return support == op ? JNI_TRUE : JNI_FALSE; } This is able to test option bitmasks that contain more than one option: it will return true if all of them are supported and false if any one of them is not supported. An exception will be thrown if you try to test for an option that hasn't been coded into tcnative. Thoughts? -chris signature.asc Description: OpenPGP digital signature
[Bug 53960] New: Extensions to HttpClient test helper class
https://issues.apache.org/bugzilla/show_bug.cgi?id=53960 Priority: P2 Bug ID: 53960 Assignee: dev@tomcat.apache.org Summary: Extensions to HttpClient test helper class Severity: enhancement Classification: Unclassified OS: Linux Reporter: br...@pingtoo.com Hardware: PC Status: NEW Version: trunk Component: Catalina Product: Tomcat 7 Created attachment 29443 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29443&action=edit Enhancements to HttpClient including preparation for no-cookie tests Ref: "FormAuthenticatorTest for cases without cookies - implementation issues" on the tomcat dev list. The attached patch prepares the HttpClient abstract helper ready for use by new Authenticator unit test cases. The change includes style cleanup, new public methods, logic refactoring and new private methods. This change leaves the class 100% backward compatible with all existing unit tests. When each of the concrete Authenticator tests are eventually extended, the new logic in HttpClient will be fully used for existing as well as new test cases. -- 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: Surprising implementation of SSL.hasOp
Hi Chris, On 03.10.2012 18:02, Christopher Schultz wrote: Looking at the OpenSSL API (wow, I really miss javadoc), it doesn't appear that there's any function that can sniff the capabilities of the engine and check to see whether a particular option is supported. Instead, the technique of using #ifdefs to conditionally include code that will return TRUE seems to be the only alternative. Apache HTTP server uses this style as well. My addition of this feature now requires an update to tcnative :( Since I'm going to be adding this, shall I try to add any particular subset of SSL options that can be checked? I'm actually wondering if checking for SSL_OP_CIPHER_SERVER_PREFERENCE is worth it, since lack of support from the OpenSSL library is highly unlikely. At any rate, the list of supported options appears to be documented here: http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html#NOTES There are only 26 documented options to check. I'm also wondering if it wouldn't be a good idea to future-proof the implementation of that method by having it throw an exception if you try to check the support-status of an option that isn't known to the code. Something like this: TCN_IMPLEMENT_CALL(jboolean, SSL, hasOp)(TCN_STDARGS, jint op) { int support = 0; #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION if (op & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) { support |= (op & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION); op ^= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; } #endif #ifdef SSL_OP_FOO if (op & SSL_OP_FOO) { support |= (op & SSL_OP_FOO); op ^= SSL_OP_FOO; // Clear FOO } #endif #ifdef SSL_OP_BAR if (op & SSL_OP_BAR) { support |= (op & SSL_OP_BAR); op ^= SSL_OP_BAR; // Clear FOO } #endif if(op) { char message[] tcn_Throw(e, 'Unsupported OpenSSL option to check: %#08lx', op); } return support == op ? JNI_TRUE : JNI_FALSE; } This is able to test option bitmasks that contain more than one option: it will return true if all of them are supported and false if any one of them is not supported. An exception will be thrown if you try to test for an option that hasn't been coded into tcnative. Thoughts? I think though ugly it's the right approach. You could try to define a macro, that takes over the if (op & SSL_OP_FOO) { support |= (op & SSL_OP_FOO); op ^= SSL_OP_FOO; // Clear FOO } part and makes it a bit shorter. The ifdef unfortunately has to stay outside of the macro, since you can't use if or ifdef inside a cpp macro. Totally untested, but maybe something along the lines of http://people.apache.org/~rjung/patches/hasOp-example.c Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Surprising implementation of SSL.hasOp
Rainer, On 10/3/12 1:30 PM, Rainer Jung wrote: > On 03.10.2012 18:02, Christopher Schultz wrote: >> Looking at the OpenSSL API (wow, I really miss javadoc), it doesn't >> appear that there's any function that can sniff the capabilities of the >> engine and check to see whether a particular option is supported. >> Instead, the technique of using #ifdefs to conditionally include code >> that will return TRUE seems to be the only alternative. > > Apache HTTP server uses this style as well. That's a good sanity check: at least we're all doing it the "long" way ;) > I think though ugly it's the right approach. You could try to define a > macro, that takes over the > >if (op & SSL_OP_FOO) { > support |= (op & SSL_OP_FOO); > op ^= SSL_OP_FOO; // Clear FOO >} > > part and makes it a bit shorter. The ifdef unfortunately has to stay > outside of the macro, since you can't use if or ifdef inside a cpp macro. > > Totally untested, but maybe something along the lines of > > http://people.apache.org/~rjung/patches/hasOp-example.c I like the idea of using a macro to compact the code a bit, but in spite of tcnative's use of macros that don't contain "arguments" for all data that will be operated on, I prefer to be explicit about mentioning all data that will be used, like this: #define TCN_SSL_TEST_OP_SUPPORT(op, option, support) \ if (op & option) { \ support |= (op & option); \ } ... #ifdef SSL_OP_MICROSOFT_SESS_ID_BUG TCN_SSL_TEST_OP_SUPPORT(op, SSL_OP_MICROSOFT_SESS_ID_BUG, support) #endif Unfortunately, it does modify those "arguments" in call-by-reference style yet does not pass them by reference, but the use of ALL_UPPER_CASE should suggest that it's a preprocessor macro and not a method call and that - possibly - the arguments might be modified. Thanks, -chris signature.asc Description: OpenPGP digital signature
Re: [VOTE] Release Apache Tomcat 7.0.32
Mark, On 10/3/12 5:24 AM, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.32 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.32/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-087/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ > > The proposed 7.0.32 release is: [X] Stable - go ahead and release 7.0.32 as Stable - [Ubuntu Linux 2.6.32, Oracle Java 1.6.0_26 64-bit, gcc 4.4.5, APR 1.4.2, OpenSSL 0.9.8o] - MD5 sums match - GPG signatures match - Source ZIP and tarball are the same - Source compiles cleanly - Bundled tcnative compiles cleanly - Checkstyle passes I did however get a unit test failure: details below. I'll check to see if it is repeatable. Thanks, -chris Testsuite: org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 2.047 sec - Standard Output --- class java.lang.Thread [pool-1-thread-4] EXITING class java.lang.Thread [pool-1-thread-1] EXITING class java.lang.Thread [pool-1-thread-3] EXITING class java.lang.Thread [pool-1-thread-2] EXITING class java.lang.Thread [pool-1-thread-5] EXITING - --- - Standard Error - Oct 3, 2012 12:17:12 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-127.0.0.1-auto-1"] Oct 3, 2012 12:17:12 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Tomcat Oct 3, 2012 12:17:12 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.32 Oct 3, 2012 12:17:12 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-127.0.0.1-auto-1-44459"] Oct 3, 2012 12:17:12 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Oct 3, 2012 12:17:12 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [pool-1-thread-3] but has failed to stop it. This is very likely to create a memory leak. Oct 3, 2012 12:17:13 PM org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler ["http-bio-127.0.0.1-auto-1-44459"] Oct 3, 2012 12:17:13 PM org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Tomcat Oct 3, 2012 12:17:13 PM org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["http-bio-127.0.0.1-auto-1-44459"] Oct 3, 2012 12:17:13 PM org.apache.coyote.AbstractProtocol destroy INFO: Destroying ProtocolHandler ["http-bio-127.0.0.1-auto-1-44459"] - --- Testcase: testTimerThreadLeak took 2.024 sec FAILED null junit.framework.AssertionFailedError: null at org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.testTimerThreadLeak(TestWebappClassLoaderExecutorMemoryLeak.java:72) signature.asc Description: OpenPGP digital signature
Re: [VOTE] Release Apache Tomcat 7.0.32
All, On 10/3/12 3:01 PM, Christopher Schultz wrote: > I did however get a unit test failure: details below. I'll check to see > if it is repeatable. > > Testsuite: > org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak A second run of this test (BIO, NIO, APR) shows that they all pass: I suspect this is an intermittent environmental test failure (the assertion that failed is that the servlet has terminated: perhaps during that run, the test didn't wait enough time - 1 second in the code - for the servlet to terminate entirely). -chris signature.asc Description: OpenPGP digital signature
svn commit: r1393743 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Wed Oct 3 20:26:42 2012 New Revision: 1393743 URL: http://svn.apache.org/viewvc?rev=1393743&view=rev Log: Vote Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1393743&r1=1393742&r2=1393743&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 3 20:26:42 2012 @@ -97,34 +97,34 @@ PATCHES PROPOSED TO BACKPORT: http://svn.apache.org/viewvc?view=revision&revision=1043983 (fixes formatting; improved documentation) http://svn.apache.org/viewvc?view=revision&revision=1049264 (improved javadoc) ) - +1: schultz, kkolinko + +1: schultz, kkolinko, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53725 Fix possible corruption of GZIP'd output. http://svn.apache.org/viewvc?rev=1378403&view=rev http://svn.apache.org/viewvc?rev=1378408&view=rev - +1: kkolinko, jfclere + +1: kkolinko, jfclere, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53793 Change links on the list of applications in the Manager to point to '/appname/' instead of '/appname'. https://issues.apache.org/bugzilla/attachment.cgi?id=29296 - +1: kkolinko, kfujino, schultz + +1: kkolinko, kfujino, schultz, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53800 FileDirContext.list() did not provide correct paths for subdirectories. Patch provided by Kevin Wooten. http://svn.apache.org/viewvc?view=revision&revision=1378819 - +1: kkolinko, kfujino, schultz + +1: kkolinko, kfujino, schultz, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53830 Better handling of Manager.randomFile default value on Windows https://issues.apache.org/bugzilla/attachment.cgi?id=29330 - +1: kkolinko, schultz + +1: kkolinko, schultz, markt -1: * Fix a behavior of TcpPingInterceptor#useThread. @@ -133,13 +133,13 @@ PATCHES PROPOSED TO BACKPORT: "Do not start a ping thread when useThread is set to false." http://svn.apache.org/viewvc?view=revision&revision=1387073 http://svn.apache.org/viewvc?view=revision&revision=1387487 - +1: kfujino, kkolinko, schultz + +1: kfujino, kkolinko, schultz, markt -1: * Improve session management in CsrfPreventionFilter (Backport of r1393071 from Tomcat 7) http://people.apache.org/~kkolinko/patches/2012-10-03_tc6_CsrfPreventionFilter.patch - +1: kkolinko + +1: kkolinko, markt -1: PATCHES/ISSUES THAT ARE STALLED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.32
On 03.10.2012 11:24, Mark Thomas wrote: The proposed 7.0.32 release is: [ ] Broken - do not release [X] Stable - go ahead and release as 7.0.32 Stable +1 to release Most notable observation: Details: - MD5 OK - signatures OK - key in KEYS file - gz and zip for src and bin consistent - src completely consistent with svn tag - builds fine - build result looks consistent with binaries - no checkstyle complaints - some Javadoc warnings (only in jdbc-pool, see below) - Unit tests one non-reproducable failure, plus some warnings (see below) - JMX MBean-Comparison - new expected attribute undeployOldVersions in the Host MBean - new Jars added to tomcat.util.scan.DefaultJarScanner.jarsToSkip. Build and tests were done using Java 1.6.0_35. OS was Solaris 10 Sparc, tcnative was 1.1.24 based on APR 1.4.6 and OpenSSL 1.0.1c (plus two patches). - Some Javadoc Warnings in jdbc-pool (not a regression) Unit test failure: [junit] Running org.apache.catalina.websocket.TestWebSocket [junit] Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 22.314 sec More log output at end of mail. Unit test warnings (except for tribes all of those look like 7.0.29 and before): - org.apache.catalina.deploy.TestWebXmlOrdering - BIO, NIO and APR: [main] org.apache.catalina.deploy.WebXml.orderWebFragments Used a wrong fragment name z at web.xml absolute-ordering tag! - org.apache.tomcat.util.net.TestCustomSsl - BIO twice "Exception getting SSL attributes" in org.apache.coyote.http11.Http11Processor actionInternal exception is: javax.net.ssl.SSLProtocolException: handshake alert: no_certificate - NIO twice "WARNING: Exception re-negotiating SSL connection" in org.apache.coyote.http11.Http11NioProcessor actionInternal - tribes: several warnings Unit test SEVERE messages: 216 total, about 40 unique messages Most of those are of type "Servlet.service() for servlet ... threw exception". "Exception" in output of unit tests: 212 times, of these 75 times "javax.servlet.ServletException: Opps." I'm not claiming that any of the SEVERE or Exception messages are new ones or important. Regards, Rainer Log output of Unit test failure: INFO: Failures in output/build/logs/TEST-org.apache.catalina.websocket.TestWebSocket.APR.txt WARN: Test failure in 'output/build/logs/TEST-org.apache.catalina.websocket.TestWebSocket.APR.txt': Testsuite: org.apache.catalina.websocket.TestWebSocket Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 22.314 sec - Standard Error - 03-Oct-2012 21:33:49.800 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6. 03-Oct-2012 21:33:49.803 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 03-Oct-2012 21:33:51.155 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012) 03-Oct-2012 21:33:52.195 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-1"] 03-Oct-2012 21:33:52.247 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Tomcat 03-Oct-2012 21:33:52.248 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/7.0.32 03-Oct-2012 21:33:52.751 INFO [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.getDefaultWebXmlFragment No global web.xml found 03-Oct-2012 21:33:53.549 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized() 03-Oct-2012 21:33:53.550 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized() 03-Oct-2012 21:33:54.030 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGenerator.createSecureRandom Creation of SecureRandom instance for session ID generation using [INSECURE] took [477] milliseconds. 03-Oct-2012 21:33:54.139 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1474ea') 03-Oct-2012 21:33:54.186 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-1-56356"] 03-Oct-2012 21:33:54.507 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-1-56356"] 03-Oct-2012 21:33:54.559 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Tomcat 03-Oct-2012 21:33:54.569 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed() 03-Oct-2012 21:33:54.570 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Context
Re: [VOTE] Release Apache Tomcat 7.0.32
On Wed, Oct 3, 2012 at 5:24 AM, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.32 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.32/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-087/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ > > The proposed 7.0.32 release is: > [ ] Broken - do not release > [ X ] Stable - go ahead and release as 7.0.32 Stable Just ran a couple of home-brewed apps + scripts for a little while, no TCKs, but looks good. Yoav > > Cheers, > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.32
+1 2012/10/3 Mark Thomas : > The proposed Apache Tomcat 7.0.32 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.32/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-087/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_32/ > > The proposed 7.0.32 release is: > [ ] Broken - do not release > [ ] Stable - go ahead and release as 7.0.32 Stable > > Cheers, > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1393913 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java webapps/docs/changelog.xml webapps/docs/config/cluster-intercepto
Author: kfujino Date: Thu Oct 4 04:55:23 2012 New Revision: 1393913 URL: http://svn.apache.org/viewvc?rev=1393913&view=rev Log: Fix a behavior of TcpPingInterceptor#useThread. Do not start a ping thread when useThread is set to false. Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-interceptor.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1393913&r1=1393912&r2=1393913&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct 4 04:55:23 2012 @@ -127,15 +127,6 @@ PATCHES PROPOSED TO BACKPORT: +1: kkolinko, schultz, markt -1: -* Fix a behavior of TcpPingInterceptor#useThread. - If set to false, ping thread is never started. - kkolinko: Better wording for the above sentence: - "Do not start a ping thread when useThread is set to false." - http://svn.apache.org/viewvc?view=revision&revision=1387073 - http://svn.apache.org/viewvc?view=revision&revision=1387487 - +1: kfujino, kkolinko, schultz, markt - -1: - * Improve session management in CsrfPreventionFilter (Backport of r1393071 from Tomcat 7) http://people.apache.org/~kkolinko/patches/2012-10-03_tc6_CsrfPreventionFilter.patch Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1393913&r1=1393912&r2=1393913&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java Thu Oct 4 04:55:23 2012 @@ -63,7 +63,7 @@ public class TcpPingInterceptor extends public synchronized void start(int svc) throws ChannelException { super.start(svc); running = true; -if ( thread == null ) { +if ( thread == null && useThread) { thread = new PingThread(); thread.setDaemon(true); thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); @@ -84,8 +84,10 @@ public class TcpPingInterceptor extends public void stop(int svc) throws ChannelException { running = false; -if ( thread != null ) thread.interrupt(); -thread = null; +if ( thread != null ) { +thread.interrupt(); +thread = null; +} super.stop(svc); } Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1393913&r1=1393912&r2=1393913&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Oct 4 04:55:23 2012 @@ -295,7 +295,11 @@ 53607: To avoid NPE, set TCP PING data to ChannelMessage. Patch provided by F.Arnoud (kfujino) - + + +Fix a behavior of TcpPingInterceptor#useThread. +Do not start a ping thread when useThread is set to false. (kfujino) + Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-interceptor.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-interceptor.xml?rev=1393913&r1=1393912&r2=1393913&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-interceptor.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-interceptor.xml Thu Oct 4 04:55:23 2012 @@ -55,6 +55,7 @@ org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor org.apache.catalina.tribes.group.interceptors.FragmentationInterceptor org.apache.catalina.tribes.group.interceptors.GzipInterceptor + org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor @@ -143,6 +144,20 @@ + + + + If useThread == true, defines the interval of sending a ping message. + default is 1000 ms. + + + Flag of whether to start a thread for sending a ping message. + If set to true, this interceptor will start a local thread for sending a ping message. + if set to false, channel heartbeat will send a ping message. + default is false. + + + - To unsubscribe, e-mail: dev-uns
svn commit: r1393915 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kfujino Date: Thu Oct 4 04:59:10 2012 New Revision: 1393915 URL: http://svn.apache.org/viewvc?rev=1393915&view=rev Log: vote Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1393915&r1=1393914&r2=1393915&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct 4 04:59:10 2012 @@ -130,7 +130,7 @@ PATCHES PROPOSED TO BACKPORT: * Improve session management in CsrfPreventionFilter (Backport of r1393071 from Tomcat 7) http://people.apache.org/~kkolinko/patches/2012-10-03_tc6_CsrfPreventionFilter.patch - +1: kkolinko, markt + +1: kkolinko, markt, kfujino -1: PATCHES/ISSUES THAT ARE STALLED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org